Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

use_github_links

Use GitHub links in URL and BugReports


Description

Populates the URL and BugReports fields of a GitHub-using R package with appropriate links. The GitHub repo to link to is determined from the current project's GitHub remotes:

  • If we are not working with a fork, this function expects origin to be a GitHub remote and the links target that repo.

  • If we are working in a fork, this function expects to find two GitHub remotes: origin (the fork) and upstream (the fork's parent) remote. In an interactive session, the user can confirm which repo to use for the links. In a noninteractive session, links are formed using upstream.

Usage

use_github_links(
  auth_token = deprecated(),
  host = deprecated(),
  overwrite = FALSE
)

Arguments

host, auth_token

Deprecated lifecycle: No longer consulted now that usethis consults the current project's GitHub remotes to get the host and then relies on gh to discover an appropriate token.

overwrite

By default, use_github_links() will not overwrite existing fields. Set to TRUE to overwrite existing links.

Examples

## Not run: 
use_github_links()

## End(Not run)

usethis

Automate Package and Project Setup

v2.0.1
MIT + file LICENSE
Authors
Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>), Jennifer Bryan [aut, cre] (<https://orcid.org/0000-0002-6983-2759>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.