Learn R Programming

pins (version 0.4.5)

board_register_github: Register GitHub Board

Description

Wrapper with explicit parameters over board_register() to register a GitHub repo as a board.

Usage

board_register_github(
  name = "github",
  repo = NULL,
  branch = NULL,
  token = NULL,
  path = "",
  host = "https://api.github.com",
  cache = board_cache_path(),
  ...
)

Arguments

name

Optional name for this board, defaults to 'github'.

repo

The GitHub repository formatted as 'owner/repo', can be NULL if the GITHUB_PAT environment variable is set.

branch

The branch to use to commit pins.

token

Token to use when GITHUB_PAT is not specified.

path

The subdirectory in the repo where the pins will be stored.

host

The URL hosting the GitHub API, defaults to "https://api.github.com".

cache

The local folder to use as a cache, defaults to board_cache_path().

...

Additional parameters required to initialize a particular board.

Details

This function requires a GitHub repo to be manually created; otherwise, registering a GitHub board will fail.

When a file upload exceeds 25MB, a GitHub release file will be used since they support up to 2GB file uploads. This threshold can be configured through the pins.github.release option which is specified in megabytes and defaults to 25.

When using GitHub Enterprise, consider customizing the host parameter to "https://yourhostname/api/v3".

See Also

board_register

Examples

Run this code
# NOT RUN {
# the following example requires a GitHub API key
board_register_github(repo = "owner/repo")
# }

Run the code above in your browser using DataLab