GHPM is a library written in R that grabs and parses data from a github repository making it easier for users to perform analytics. Using Github's flexible GraphQL API and R's dataframe structure, ghpm returns repository data about issues, milestones, project boards, and pull requests which can be melded together to identify useful analytical information.
As an example, say I wanted to get detailed information about each commit with the label "feature" associated with a specified milestone. I could do the following:
library(ghpm) library(dplyr) # Returns a dataframe displaying the general information of each issue issues <- get_issues("<groupname>", "<packagename>") # Returning a dataframe gives us access to all the dplyr functions. issues_v1 <- issues %>% filter(milestone == "v0.1.0") features <- get_issue_labels("<groupname>", "<packagename>") %>% filter(label == "feature") issue_features <- issues_v1 %>% left_join(features, by = issue)
If you encounter an issue/bug, please create a new issue within the Github Issues Page including as much detail as possible.
Unit tests are written for most GHPM functions to verify that the json response being fed into the function is parsed correctly. To do this, known/common json responses for a specific query are mimicked via the mockery::stub
function when the function being tested is called. The response is tested for known values to verify that it was parsed correctly and to prevent any breaking changes from taking place.
To regenerate a test json response after changing a function, simply rerun the query with known good parameters and copy the exact response into the appropriate json file.
Released under the BSD License
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.