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. :smile_cat: 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.
:rocket:
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 system
environment in the following order of precedence:
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.
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 |
Add your use case to the list by opening an issue !
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
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.