knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
Create a simple human readable table for readme that displays status of GitHub repositoy issues
You can install issue from github with:
# install.packages("remotes") remotes::install_github("yonicd/issue")
This package relies heavily on the querying the GitHub API. You can create a personal access token (PAT) in R
with usethis.
library(issue)
raw_data <- issue::get_issues( repo = 'r-lib/pkgdown', last = 20, PAT = Sys.getenv('GITHUB_PAT') )
tbl <- raw_data%>% issue::issue_tibble()
x <- tbl%>% issue::md_table()
x[c(1:5),]%>% knitr::kable()
View More
x[-c(1:5),]%>% knitr::kable()
The issue_tibble
has all kinds of useful information for developers to interrogate either their own repository or other repositories directly from R
.
tbl%>% dplyr::glimpse()
tbl$comments_users[[1]]%>% dplyr::glimpse()
tbl$comments_users[[1]]$user[[1]]%>% tibble::as.tibble()%>% dplyr::glimpse()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.