README.md

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

| issue | icon | title | labels | opened_by | comments | comments_users | assigned_to | created | updated | closed | | :---- | :--------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------- | :-------------------------------------------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------- | :------------------ | :------------------ | :----- | | 927 | | Bad image links in index | reprex | Eluvias | 2 | jayhesselberth, Eluvias | | 2018-12-03 23:54:34 | 2018-12-04 01:48:15 | NA | | 925 | | Vertical alignment of params and param docs is wonky | bug,front end :tulip: | jennybc | 1 | jayhesselberth | | 2018-12-03 21:44:32 | 2018-12-04 00:00:08 | NA | | 920 | | vignette chunk settings | reprex | luca-scr | 5 | yaml config.">jayhesselberth, luca-scr, a reprex?">jayhesselberth, luca-scr, hadley | | 2018-11-26 08:05:44 | 2018-12-03 19:41:16 | NA | | 916 | | colorize the README | feature | IndrajeetPatil | 2 | jayhesselberth, hadley | | 2018-11-22 17:36:29 | 2018-12-03 18:13:21 | NA | | 911 | | When using a custom navbar, the home page button is lost | bug,home :house: | DavisVaughan | 2 | hadley, hadley | | 2018-11-21 18:02:36 | 2018-12-03 16:57:49 | NA |

View More

| issue | icon | title | labels | opened_by | comments | comments_users | assigned_to | created | updated | closed | | :---- | :------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------- | :-------------------------------------------------- | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------- | :------------------ | :------------------ | :------------------ | | 924 | | Release pkgdown 1.2.1 | | hadley | 1 | hadley | | 2018-12-03 16:24:15 | 2018-12-03 16:25:05 | NA | | 915 | | Deploy instructions create branch that pkgdown won’t write to | deploy :airplane:,docs | hadley | 5 | hadley, jayhesselberth, hadley, jayhesselberth, hadley | | 2018-11-22 16:15:06 | 2018-12-04 00:00:29 | 2018-12-03 16:24:11 | | 923 | | Recommend remotes::install_cran in deploy docs | deploy :airplane:,docs | hadley | 0 | | | 2018-12-03 14:50:17 | 2018-12-03 16:19:49 | 2018-12-03 16:19:48 | | 918 | | htmlwidgets Index.Rmd | wip | JohnCoene | 1 | jayhesselberth | | 2018-11-24 20:34:22 | 2018-12-03 12:01:29 | 2018-12-03 12:01:29 | | 921 | | R output format from examples in help/reference pages | feature | luca-scr | 5 | jayhesselberth, luca-scr, jayhesselberth, hadley, luca-scr | | 2018-11-26 08:12:40 | 2018-11-28 11:42:50 | 2018-11-28 11:42:50 | | 913 | | jayhesselberth, hadley | | 2018-11-24 21:51:52 | 2018-12-03 16:03:23 | 2018-12-03 12:01:29 | | 917 | | replace ‘longer’ | | wibeasley | 0 | | | 2018-11-23 04:41:27 | 2018-11-23 14:12:40 | 2018-11-23 14:12:39 | | 914 | | Hide sidebar on mobile home pages. | | jayhesselberth | 0 | | | 2018-11-22 15:43:52 | 2018-11-22 18:37:09 | 2018-11-22 15:55:54 | | 912 | | Fix html table class tweaking | | jayhesselberth | 0 | | | 2018-11-21 18:49:12 | 2018-11-21 19:44:32 | 2018-11-21 19:20:14 | | 909 | | Copy edits, mostly wordos | | jennybc | 1 | jayhesselberth | | 2018-11-20 16:52:15 | 2018-11-20 16:54:02 | 2018-11-20 16:53:58 |

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()
#> Observations: 20
#> Variables: 16
#> $ issue          <chr> "927", "925", "920", "916", "911", "924", "915"...
#> $ state          <chr> "open", "open", "open", "open", "open", "open",...
#> $ pull_request   <lgl> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE...
#> $ merged         <lgl> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE...
#> $ title          <chr> "Bad image links in index", "Vertical alignment...
#> $ url            <chr> "https://github.com/r-lib/pkgdown/issues/927", ...
#> $ body           <chr> "The figures generated from README are sourced ...
#> $ labels         <chr> "reprex", "bug,front end :tulip:", "reprex", "f...
#> $ opened_by      <chr> "Eluvias", "jennybc", "luca-scr", "IndrajeetPat...
#> $ opened_by_url  <chr> "https://github.com/Eluvias", "https://github.c...
#> $ comments       <chr> "2", "1", "5", "2", "2", "1", "5", "0", "1", "5...
#> $ comments_users <list> [<# A tibble: 2 x 10,   url   html_url issue_u...
#> $ assigned_to    <chr> "", "", "", "", "", "", "", "", "", "", "", "",...
#> $ created        <dttm> 2018-12-03 23:54:34, 2018-12-03 21:44:32, 2018...
#> $ updated        <dttm> 2018-12-04 01:48:15, 2018-12-04 00:00:08, 2018...
#> $ closed         <dttm> NA, NA, NA, NA, NA, NA, 2018-12-03 16:24:11, 2...
tbl$comments_users[[1]]%>%
  dplyr::glimpse()
#> Observations: 2
#> Variables: 10
#> $ url                <list> ["https://api.github.com/repos/r-lib/pkgdo...
#> $ html_url           <list> ["https://github.com/r-lib/pkgdown/issues/...
#> $ issue_url          <list> ["https://api.github.com/repos/r-lib/pkgdo...
#> $ id                 <list> [443927168, 443938848]
#> $ node_id            <list> ["MDEyOklzc3VlQ29tbWVudDQ0MzkyNzE2OA==", "...
#> $ user               <list> [["jayhesselberth", 355367, "MDQ6VXNlcjM1N...
#> $ created_at         <list> ["2018-12-04T00:48:41Z", "2018-12-04T01:48...
#> $ updated_at         <list> ["2018-12-04T00:48:41Z", "2018-12-04T01:48...
#> $ author_association <list> ["COLLABORATOR", "NONE"]
#> $ body               <list> ["Yes they should be linked to `reference/...
tbl$comments_users[[1]]$user[[1]]%>%
  tibble::as.tibble()%>%
  dplyr::glimpse()
#> Observations: 1
#> Variables: 18
#> $ login               <chr> "jayhesselberth"
#> $ id                  <int> 355367
#> $ node_id             <chr> "MDQ6VXNlcjM1NTM2Nw=="
#> $ avatar_url          <chr> "https://avatars3.githubusercontent.com/u/...
#> $ gravatar_id         <chr> ""
#> $ url                 <chr> "https://api.github.com/users/jayhesselberth"
#> $ html_url            <chr> "https://github.com/jayhesselberth"
#> $ followers_url       <chr> "https://api.github.com/users/jayhesselber...
#> $ following_url       <chr> "https://api.github.com/users/jayhesselber...
#> $ gists_url           <chr> "https://api.github.com/users/jayhesselber...
#> $ starred_url         <chr> "https://api.github.com/users/jayhesselber...
#> $ subscriptions_url   <chr> "https://api.github.com/users/jayhesselber...
#> $ organizations_url   <chr> "https://api.github.com/users/jayhesselber...
#> $ repos_url           <chr> "https://api.github.com/users/jayhesselber...
#> $ events_url          <chr> "https://api.github.com/users/jayhesselber...
#> $ received_events_url <chr> "https://api.github.com/users/jayhesselber...
#> $ type                <chr> "User"
#> $ site_admin          <lgl> FALSE


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