create_github_repo | R Documentation |
Create, configure, clone, and open a new GitHub R package repository following rdev conventions.
create_github_repo(
repo_name,
repo_desc = "",
private = FALSE,
org = NULL,
host = getOption("rdev.host")
)
repo_name |
The name of the GitHub repository to create |
repo_desc |
The description of the GitHub repository to create |
private |
If |
org |
The organization to create the repository in. If |
host |
GitHub host to target, passed to the For a hypothetical GitHub Enterprise instance, either "https://github.acme.com/api/v3" or "https://github.acme.com" is acceptable. |
When run, create_github_repo()
:
Creates a new GitHub repository using gh::gh()
with license template from get_license()
Activates Dependabot alerts per getOption("rdev.dependabot", default = TRUE)
Activates Dependabot security updates per getOption("rdev.dependabot", default = TRUE)
Adds branch protection to the default branch (if private
is FALSE
)
Clones the repository locally with usethis::create_from_github()
Creates a basic package using usethis::create_package()
If running interactively on macOS, the repository will automatically be opened in RStudio, GitHub Desktop, and the default browser
return value from gh::gh()
creating the repository, invisibly
GitHub Actions can be disabled by setting rdev.github.actions
to
FALSE
: options(rdev.github.actions = FALSE)
Set the rdev.host
option when using a GitHub Enterprise server:
options(rdev.host = "https://github.example.com/api/v3")
quickstart
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.