Title: | An R package that backs up your GitHub repositories |
---|---|
Description: | Provide functions to allow users to back up repositories in organizations. |
Authors: | Bai Li [aut, cre], Giselle Schmitz [aut] |
Maintainer: | Bai Li <[email protected]> |
License: | GPL-3 + file LICENSE |
Version: | 0.0.0.9000 |
Built: | 2024-11-01 11:26:20 UTC |
Source: | https://github.com/nmfs-fish-tools/ghBackup |
The function uses gh_token to access GitHub API URL to download organization repositories. It returns all backup materials in a folder on users' local machine.
back_up_gh_orgs(gh_token, backup_path, orgs_name = NULL)
back_up_gh_orgs(gh_token, backup_path, orgs_name = NULL)
gh_token |
Token number from GitHub website. |
backup_path |
Directory where backup materials are located. |
orgs_name |
Name of the organization. A vector of names. Otherwise the function will backup all organizations that are associated with your account. |
Backup of GitHub repository in the directory where backup_path
is
## Not run: back_up_gh_orgs( gh_token = "abcdefghijklmnopqrstuvwxyz01234567890123", backup_path = "C:/Users/ghbackup/", orgs_name = c("nmfs-fish-tools", "nmfs-general-modeling-tools") ) back_up_gh_orgs( gh_token = gh::gh_token(), backup_path = "C:/Users/ghbackup/", orgs_name = c("nmfs-fish-tools", "nmfs-general-modeling-tools") ) ## End(Not run)
## Not run: back_up_gh_orgs( gh_token = "abcdefghijklmnopqrstuvwxyz01234567890123", backup_path = "C:/Users/ghbackup/", orgs_name = c("nmfs-fish-tools", "nmfs-general-modeling-tools") ) back_up_gh_orgs( gh_token = gh::gh_token(), backup_path = "C:/Users/ghbackup/", orgs_name = c("nmfs-fish-tools", "nmfs-general-modeling-tools") ) ## End(Not run)
The function uses identified path to check the size of given directory. It returns the total size of files in the directory
dir_size(path)
dir_size(path)
path |
The full path to directory to be sized |
Sum of size of files in directory
## Not run: dir_size(path = "C:/ghBackup/R") ## End(Not run)
## Not run: dir_size(path = "C:/ghBackup/R") ## End(Not run)