github_source: Source a R script from a commit

Description Usage Arguments Value Examples

Description

This function sources an R script from a commit in a repository using source().

Usage

1
github_source(path, ref, repo, ...)

Arguments

path

(string) The path to the file, within the repository.

ref

(string) Either a SHA, branch or tag used to identify the commit.

repo

(string) The repository specified in the format: owner/repo.

...

Parameters passed to source().

Value

The result of the sourced script.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 

  github_source(
    path = "inst/test-data/test-script.R",
    ref  = "main",
    repo = "ChadGoymer/githapi"
  )


## End(Not run)

ChadGoymer/githapi documentation built on Oct. 22, 2021, 10:56 a.m.