Skip to contents

Uses gh::gh() to fetch all available releases of the specified GitHub repository via GitHub's REST API and returns them as a tibble containing the columns id, version_nr, is_pre_release and is_draft.

Usage

gh_releases(
  owner,
  name,
  n = Inf,
  incl_pre_releases = FALSE,
  incl_drafts = FALSE
)

Arguments

owner

GitHub repository owner (GitHub user or organisation). A character scalar.

name

Repository name. A character scalar.

n

Number of releases to return. A positive integer or Inf. If Inf, all releases are returned, otherwise only the most recent n releases. Note that requesting many releases may result in multiple GitHub API calls, which can take a considerable amount of time.

incl_pre_releases

Whether or not to include pre-releases in the result. Pre-releases are usually not deemed ready for production and may be unstable. For more information, see the GitHub Docs.

incl_drafts

Whether or not to include draft releases in the result. For more information, see the GitHub Docs.

Value

A tibble with the columns id, version_nr, is_pre_release, and is_draft.

See also

Other GitHub functions: gh_dir_ls(), gh_release_latest(), gh_text_file(), gh_text_files()

Examples

yay::gh_releases(owner = "jgm",
                 name = "pandoc",
                 n = 3L)
#> # A tibble: 3 × 4
#>          id version_nr is_pre_release is_draft
#>       <int> <nmrc_vrs> <lgl>          <lgl>   
#> 1 150113892 3.1.13     FALSE          FALSE   
#> 2 146968498 3.1.12.3   FALSE          FALSE   
#> 3 144315930 3.1.12.2   FALSE          FALSE