Skip to content

Instantly share code, notes, and snippets.

@romainfrancois
Last active December 26, 2015 16:19
Show Gist options
  • Save romainfrancois/7179245 to your computer and use it in GitHub Desktop.
Save romainfrancois/7179245 to your computer and use it in GitHub Desktop.
getting github issues for a given repo

Simple R script that grabs the opened issues from a github repo :

$ github_issues hadley/dplyr
   number           user                                                         title                labels
1      98         hadley                                   Setup databases with travis           enhancement
2      97         hadley                                               Unique operator           enhancement
3      96         hadley                           Implement right join and outer join           enhancement
4      95 romainfrancois                                             Hybrid evaluation enhancement, internal
5      94         hadley                 Make sure all vignettes work from R CMD check                   bug
6      93         hadley               Document and implement "col aligning operators"           enhancement
7      91         hadley                                                MySQL problems                   bug
8      82         hadley                  equal_data_frame should be more configurable           enhancement
9      78         hadley Provide version of equal_data_frame that works like all.equal           enhancement
10     62 romainfrancois                                      Registration of reducers              internal
11     57 romainfrancois                                     Support more result types              internal
12     44         hadley                               Strict version of translate_sql           enhancement
13     43         hadley                  Consistent interface for windowing functions           enhancement
14     40         hadley                                        Should tbl_dt be lazy?           enhancement
15     37         hadley                                  Implement ganalytics backend           enhancement
16     35         hadley                                        Simplify generated sql           enhancement
17     29         hadley                                            Plyr compatibility           enhancement
18     14         hadley                                       Other types of grouping           enhancement
19      8         hadley                                               MonetDB backend           enhancement
#!/usr/bin/Rscript
library(methods)
library(siesta)
github <- json_api( "https://api.github.com/" )
github_issues <- github$bind( "repos/:user/:repo/issues",
number,
login = user$login,
title,
labels = paste( sapply( labels, "[[", "name" ), collapse = ", " )
)
args <- commandArgs(TRUE)
options( width = 200 )
rx <- "^(.*)/(.*)$"
user <- sub( rx, "\\1", tail( args, 1L) )
repo <- sub( rx, "\\2", tail( args, 1L) )
github_issues( user, repo )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment