Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metrumresearchgroup/ghpm
https://github.com/metrumresearchgroup/ghpm
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/metrumresearchgroup/ghpm
- Owner: metrumresearchgroup
- License: bsd-3-clause-clear
- Created: 2020-06-10T12:19:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-30T19:56:23.000Z (about 3 years ago)
- Last Synced: 2024-08-01T23:32:18.988Z (5 months ago)
- Language: R
- Size: 382 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
title: "GHPM"
output: github_document
---## Overview
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.
## Usage
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:
```{r, eval = FALSE}
library(ghpm)
library(dplyr)# Returns a dataframe displaying the general information of each issue
issues <- get_issues("", "")# Returning a dataframe gives us access to all the dplyr functions.
issues_v1 <- issues %>% filter(milestone == "v0.1.0")features <- get_issue_labels("", "") %>% filter(label == "feature")
issue_features <- issues_v1 %>% left_join(features, by = issue)
```## Issues/Bugs
If you encounter an issue/bug, please create a new issue within the Github Issues Page including as much detail as possible.## Tests
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.
## License
Released under the [BSD License](https://ghe.metrumrg.com/tech-experiments/ghpm/blob/master/LICENSE)