if (FALSE) {
repo_create("ghclass-test", "repo_test")
repo_exists("ghclass-test/repo_test")
repo_rename("ghclass-test/repo_test", "repo_test_new")
# The new repo exists
repo_exists("ghclass-test/repo_test_new")
# The old repo forwards to the new repo
repo_exists("ghclass-test/repo_test")
# Check for the redirect by setting `strict = TRUE`
repo_exists("ghclass-test/repo_test", strict = TRUE)
# The prefered way of copying a repo is by making the source a template
repo_is_template("ghclass-test/repo_test_new")
repo_set_template("ghclass-test/repo_test_new")
repo_is_template("ghclass-test/repo_test_new")
# Given a template repo we can then directly copy the repo on GitHub
repo_mirror_template("ghclass-test/repo_test_new", "ghclass-test/repo_test_copy")
repo_exists("ghclass-test/repo_test_copy")
# Cleanup
repo_delete(
c("ghclass-test/repo_test_new",
"ghclass-test/repo_test_copy"),
prompt = FALSE
)
}
Run the code above in your browser using DataLab