knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

issue

Create a simple human readable table for readme that displays status of GitHub repositoy issues

Installation

You can install issue from github with:

# install.packages("remotes")
remotes::install_github("yonicd/issue")

Prerequisites

This package relies heavily on the querying the GitHub API. You can create a personal access token (PAT) in R with usethis.

Usage

Load Library

library(issue)

Query API

raw_data <- issue::get_issues(
  repo = 'r-lib/pkgdown',
  last = 20,
  PAT  = Sys.getenv('GITHUB_PAT')
  )

Transform to a tibble

tbl <- raw_data%>%
  issue::issue_tibble()

Convert to markdown ready tibble

x <- tbl%>%
  issue::md_table()

Current Issues

x[c(1:5),]%>%
  knitr::kable()

View More

x[-c(1:5),]%>%
  knitr::kable()


For Developers

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()


yonicd/ghstatus documentation built on May 25, 2019, 9:25 a.m.