Get information on pull requests from the specified GitHub repository. This is a wrapper around the 'gh' package. Original code taken from https://github.com/jennybc/analyze-github-stuff-with-r/.

get_gh_pr(owner, repo, start_date = NULL, end_date = NULL)

Arguments

owner

String specifying the owner of the repository.

repo

String specifying the name of the repo.

start_date

String specifying start date of reporting period to filter by, in the format YYYY-MM-DD. NULL by default, where no filters will be applied.

end_date

String specifying end date of reporting period to filter by, in the format YYYY-MM-DD. NULL by default, where no filters will be applied.

Value

A data frame containing details of GitHub pull requests identified in the specified date range.

Examples

# \donttest{ get_gh_pr(owner = "martinctc", repo = "rwa")
#> # A tibble: 5 × 16 #> number id title state user commits_url diff_url patch_url #> <int> <int> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 7 581407125 Feature: … open mart… https://api.g… https://g… https://gi… #> 2 6 567945645 Feature: … open mart… https://api.g… https://g… https://gi… #> 3 5 525191382 Patch/cra… closed mart… https://api.g… https://g… https://gi… #> 4 4 515722962 Patch: Mi… closed mart… https://api.g… https://g… https://gi… #> 5 2 497457153 Release/0… closed mart… https://api.g… https://g… https://gi… #> # … with 8 more variables: merge_commit_sha <chr>, pr_HEAD_label <chr>, #> # pr_HEAD_sha <chr>, pr_base_label <chr>, pr_base_sha <chr>, #> # created_at <date>, closed_at <date>, merged_at <date>
# }