
Get GitHub Issue Timeline or Event Details
Source:R/ngr_git_issue_details.R
ngr_git_issue_details.RdThis function retrieves the timeline or event details for a specified GitHub issue using the GitHub API. By default, it filters for events associated with commits only.
Usage
ngr_git_issue_details(
issue_url_json,
token = gh::gh_token(),
endpoint = "timeline",
events_all = FALSE
)Arguments
- issue_url_json
character. The full GitHub API URL of the issue (e.g., "https://api.github.com/repos/user/repo/issues/123").
- token
character. A GitHub personal access token (PAT). Default is
gh::gh_token().- endpoint
character. The API endpoint to use for retrieving issue events. Defaults to "timeline". to access administrative actions like mentioned, labeling or assigning.
- events_all
logical. If
TRUE, return all events. IfFALSE(default), return only those associated with commits (i.e., with a non-nullcommit_id).
References
GitHub Issue Event Types: https://docs.github.com/en/rest/using-the-rest-api/issue-event-types
Examples
ngr_git_issue_details("https://api.github.com/repos/NewGraphEnvironment/fpr/issues/13")
#> Error in validate_gh_pat(new_gh_pat(x)): Invalid GitHub PAT format
#> ℹ A GitHub PAT must have one of three forms:
#> • 40 hexadecimal digits (older PATs)
#> • A 'ghp_' prefix followed by 36 to 251 more characters (newer PATs)
#> • A 'github_pat_' prefix followed by 36 to 244 more characters (fine-grained
#> PATs)
#> ℹ Read more at
#> <https://gh.r-lib.org/articles/managing-personal-access-tokens.html>.
ngr_git_issue_details("https://api.github.com/repos/NewGraphEnvironment/fpr/issues/13", events_all = TRUE)
#> Error in validate_gh_pat(new_gh_pat(x)): Invalid GitHub PAT format
#> ℹ A GitHub PAT must have one of three forms:
#> • 40 hexadecimal digits (older PATs)
#> • A 'ghp_' prefix followed by 36 to 251 more characters (newer PATs)
#> • A 'github_pat_' prefix followed by 36 to 244 more characters (fine-grained
#> PATs)
#> ℹ Read more at
#> <https://gh.r-lib.org/articles/managing-personal-access-tokens.html>.