This function constructs a list of needed information to send API calls to a specific GitHub repository. Specifically, it stores information on the repository's name and owner, the type (whether or not Enterprise GitHub), and potentially credentials to authenticate.
create_repo_ref(
repo_owner,
repo_name,
is_enterprise = FALSE,
hostname = "",
identifier = ""
)List of repository reference information and credentials
Repository owner's username or GitHub Organization name
Repository name
Boolean denoting whether or not working with Enterprise GitHub.Defaults to FALSE
Host URL stub for Enterprise repositories (e.g. "mycorp.github.com")
Ideally should be left blank and defaults to using GITHUB_PAT or GITHUB_ENT_PAT
environment variables as Personal Access Tokens. If identifier,
this is assumed to be an alternative name of the environment variable to use for your Personal Access Token
Note that this package can be used for GET requests on public repositories without any authentication
(resulting in a lower rate limit.) To do this, simply pass any string into identifier that is not
an environment variable already defined for your system (e.g. accessible through Sys.getenv("MY_VAR"))
if (FALSE) {
myrepo <- create_repo_ref('emilyriederer', 'myrepo')
}
Run the code above in your browser using DataLab