deleteGitHubRepo {archivist.github}R Documentation

Delete the Existing GitHub Repository

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

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 https://pbiecek.github.io/archivist/articles/posts.html

See Also

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

Examples

## 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)


[Package archivist.github version 0.2.6 Index]