deleteGitHubRepo: Delete the Existing GitHub Repository

Description Usage Arguments Details Note Author(s) References See Also Examples

View source: R/deleteGitHubRepo.R

Description

deleteGitHubRepo can delete whole GitHub-Repository or only archivist-like Repository stored on a GitHub-Repository (then it requires more parameters to be specified).

This function is well explained on this http://r-bloggers.com/r-hero-saves-backup-city-with-archivist-and-github blog post.

Usage

1
2
3
deleteGitHubRepo(repo, github_token = aoptions("github_token"),
  user = aoptions("user"), password = aoptions("password"), unset = FALSE,
  deleteRoot = FALSE, subdir = NULL, response = aoptions("response"))

Arguments

repo

While working with a Github repository. A character denoting GitHub repository name to be deleted.

github_token

While working with a Github repository. An OAuth GitHub Token created with the oauth2.0_token function. To delete GitHub Repository you need to have delete_repo scope set - see examples. See archivist-github-integration. Can be set globally with aoptions("github_token", github_token).

user

While working with a Github repository. A character denoting GitHub user name. Can be set globally with aoptions("user", user). See archivist-github-integration.

password

Only when deleteRoot = FALSE. While working with a Github repository. A character denoting GitHub user password. Can be set globally with aoptions("password", password). See archivist-github-integration.

unset

A logical. If deleted repoDir/repo was set to be default Local/GitHub Repository and unset is TRUE, then repoDir/repo is unset as a default Local/GitHub Repository (aoptions('repoDir/repo', NULL, T)).

deleteRoot

A logical value that specifies if the repository root directory should be deleted for Local Repository or for GitHub whether to delete whole GitHub-Repository.

subdir

Only when deleteRoot = FALSE. Subdirectory in which the archivist-Repository is stored on a GitHub Repository. If it's in main directory, then specify to NULL (default).

response

A logical value. Should the GitHub API response be returned (only when deleteRoot = TRUE).

Details

To learn more about Archivist Integration With GitHub visit agithub. To delete GitHub Repository you need to have delete_repo scope set - see examples.

Note

Bug reports and feature requests can be sent to https://github.com/MarcinKosinski/archivist.github/issues

Author(s)

Marcin Kosinski, m.p.kosinski@gmail.com

References

More about archivist.github can be found on marcinkosinski.github.io/archivist.github/ and about archivist in posts' history on http://pbiecek.github.io/archivist/Posts.html

See Also

Other archivist.github: archive, archivist.github-package, authoriseGitHub, cloneGitHubRepo, createGitHubRepo, pushGitHubRepo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

authoriseGitHub(ClientID, ClientSecret, 
                scope = c("public_repo", "delete_repo")) -> github_token
# authoriseGitHub also does: aoptions("github_token", github_token)
aoptions("user", user.name)
aoptions("password", user.password)

createGitHubRepo("Museum")
deleteGitHubRepo(repo = "Museum", deleteRoot = TRUE, response = TRUE)


## End(Not run)

MarcinKosinski/archivist.github documentation built on May 7, 2019, 2:48 p.m.