Provides some helper functions for using GitHub V4 API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
man
tests
.Rbuildignore
.gitignore
.travis.yml
CODE_OF_CONDUCT.md
DESCRIPTION
LICENSE
NAMESPACE
README.Rmd
README.md
appveyor.yml
codecov.yml
codemeta.json
ghrecipes.Rproj

README.md

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. Travis build status Coverage status

ghrecipes

The goal of ghrecipes is to provide helper functions for usual GitHub data mining tasks, well at least the ones that are usual or useful for us. 😸 Please suggest and discuss new recipes in the issues tracker!

It usesGitHub V4 API queried thanks to the ghql package. Read more about GitHub V4 API advantages here. It then formats results using the jqr package, interface to jq. Read an intro to jqr power here. 🚀

Installation

You can install ghrecipes from GitHub with:

# install.packages("devtools")
devtools::install_github("ropenscilabs/ghrecipes")

Tokens

To access GitHub, ghrecipes looks for tokens stored in the system environment in the following order of precedence:

  1. GITHUB_GRAPHQL_TOKEN
  2. GITHUB_TOKEN
  3. GITHUB_PAT

Most functions require only the repo scope. However, get_teams() requires either read:org or read:discussion scopes, and get_collaborators() requires push access to the repository of interest.

For step-by-step guidance on getting and storing a GitHub token, refer to the instructions in the usethis package.

Examples

Don’t miss conversations by your favorite developers or comments by your favorite styling bot. In that function, only the latest results are returned, and an issue can be a PR.

ghrecipes::spy("lintr-bot", type = "Issue")
#> NULL
convos <- ghrecipes::spy("lintr-bot", type = "PullRequest")
knitr::kable(convos[1:10,])
owner repo title created_at state author url no_comments id
PredictiveEcology SpaDES.tools move RandomFields to Suggests 2018-09-18 23:04:49 MERGED achubaty https://github.com/PredictiveEcology/SpaDES.tools/pull/50 1 50
PredictiveEcology SpaDES.tools rasterizeReduced uses crs 2018-09-04 20:40:18 MERGED achubaty https://github.com/PredictiveEcology/SpaDES.tools/pull/49 1 49
bokeh rbokeh Update to 0.12.5 2017-06-07 20:11:51 OPEN hafen https://github.com/bokeh/rbokeh/pull/217 7 217
NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA

Use cases in the wild

Add your use case to the list by opening an issue !

Nice words

Both the package actual use and its source code have been very useful to me in understanding graphQL and the Github API. Thanks @ma_salmon! https://t.co/i8KUAMGfsn

— Christian Minich (@ChristianNolan) 29 d’abril de 2018

Meta

Please note that this project is released with a Contributor Code of Conduct.

By participating in this project you agree to abide by its terms.