The goal of ghrecipes is to provide helper functions for usual GitHubdata mining tasks, well at least the ones that are usual or useful forus.
It usesGitHub V4 API queried thanksto the ghql
package. Read moreabout GitHub V4 API advantageshere. Itthen formats results using the jqr
package, interface tojq. Read an intro to jqr
powerhere.
You can install ghrecipes from GitHub with:
# install.packages("devtools")
devtools::install_github("ropenscilabs/ghrecipes")
To access GitHub, ghrecipes
looks for tokens stored in the systemenvironment in the following order of precedence:
Most functions require only the repo
scope. However, get_teams()
requires either read:org
or read:discussion
scopes, andget_collaborators()
requires push access to the repository ofinterest.
For step-by-step guidance on getting and storing a GitHub token, referto theinstructionsin the usethis
package.
Don’t miss conversations by your favorite developers or comments by yourfavorite 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 |
Add your use case to the list by opening anissue !
Both the package actual use and its source code have been very useful tome in understanding graphQL and the Github API. Thanks@ma_salmon!https://t.co/i8KUAMGfsn
— Christian Minich (@ChristianNolan)29d’abril de 2018
Please note that this project is released with a Contributor Code ofConduct.
By participating in this project you agree to abide by its terms.