| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/github.R |
| 3 |
\name{github_releases} |
| 4 |
\alias{github_releases} |
| 5 |
\title{Get the tags of GitHub releases of a repository} |
| 6 |
\usage{ |
| 7 |
github_releases( |
| 8 |
repo, |
| 9 |
tag = "", |
| 10 |
pattern = "v[0-9.]+", |
| 11 |
use_jsonlite = loadable("jsonlite") |
| 12 |
) |
| 13 |
} |
| 14 |
\arguments{ |
| 15 |
\item{repo}{The repository name of the form \code{user/repo}, e.g., |
| 16 |
\code{"yihui/xfun"}.} |
| 17 |
|
| 18 |
\item{tag}{A tag as a character string. If provided, it will be returned if |
| 19 |
the tag exists. If \code{tag = "latest"}, the tag of the latest release is |
| 20 |
returned.} |
| 21 |
|
| 22 |
\item{pattern}{A regular expression to match the tags.} |
| 23 |
|
| 24 |
\item{use_jsonlite}{Whether to use \pkg{jsonlite} to parse the releases info.} |
| 25 |
} |
| 26 |
\value{ |
| 27 |
A character vector of (GIT) tags. |
| 28 |
} |
| 29 |
\description{ |
| 30 |
Use the GitHub API (\code{\link[=github_api]{github_api()}}) to obtain the tags of the |
| 31 |
releases. |
| 32 |
} |
| 33 |
\examples{\dontshow{if (interactive()) \{} |
| 34 |
xfun::github_releases("yihui/litedown") |
| 35 |
xfun::github_releases("gohugoio/hugo", "latest") |
| 36 |
\dontshow{\}} |
| 37 |
} |