create_repo_ref {projmgr}R Documentation

Create reference to a GitHub repository

Description

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.

Usage

create_repo_ref(
  repo_owner,
  repo_name,
  is_enterprise = FALSE,
  hostname = "",
  identifier = ""
)

Arguments

repo_owner

Repository owner's username or GitHub Organization name

repo_name

Repository name

is_enterprise

Boolean denoting whether or not working with Enterprise GitHub.Defaults to FALSE

hostname

Host URL stub for Enterprise repositories (e.g. "mycorp.github.com")

identifier

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

Details

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

Value

List of repository reference information and credentials

Examples

## Not run: 
myrepo <- create_repo_ref('emilyriederer', 'myrepo')

## End(Not run)


[Package projmgr version 0.1.1 Index]