Learn R Programming

ghee (version 0.1.0)

gh_repos_mutate: Change repository features

Description

This function allows you to update a repository's features. You can easily change the repository's name, privacy settings, and more.

Usage

gh_repos_mutate(path, ...)

Arguments

path

GitHub repo path of the form "username/repo". If not provided, will default to current repo.

...

Additional parameters, see https://docs.github.com/en/rest

Value

NA; called for side effects to manipulate GitHub repositories.

See Also

Other Repositories: gh_repos_create(), gh_repos_delete_internal(), gh_repos_delete(), gh_repos_list()

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
# Create a Private Repo
gh_repos_create(path = "jdtrat/ghee_test", private = TRUE, description = "A test repository.")

# Disable Issues
gh_repos_mutate(path = "jdtrat/ghee_test", has_issues = FALSE)

# Update Description
gh_repos_mutate(path = "jdtrat/ghee_test", description = "A test repository for {ghee}.")

# Remove Description
gh_repos_mutate("jdtrat/friend", description = NA)

# Change Privacy Settings
gh_repos_mutate(path = "jdtrat/ghee_test", private = FALSE)

# Change Repo Name
gh_repos_mutate(path = "jdtrat/ghee_test", name = "ghee_testing")

# Change Repo Name Back
# Note the path argument reflects the name change
gh_repos_mutate(path = "jdtrat/ghee_testing", name = "ghee_test")

# Delete Repo
# Note this requires a special GitHub Token and should be used with caution.
gh_repos_delete("jdtrat/ghee_test")

# }
# NOT RUN {

# }

Run the code above in your browser using DataLab