use_github_labels() creates new labels and/or changes label colours. It does not generally remove labels. But if you set delete_default = TRUE, it will delete labels that are (1) flagged by the API as being GitHub default labels and (2) not present in the labels you provide via labels.

tidy_labels() returns the labels and colours commonly used by tidyverse packages.

use_github_labels(labels = tidy_labels(), delete_default = FALSE,
  auth_token = NULL, host = NULL)

tidy_labels()

Arguments

labels

Named character vector of labels. The names are the label text, such as "bug", and the values are the label colours in hexadecimal, such as "e02a2a". First, labels that don't yet exist are created, then label colours are updated.

delete_default

If TRUE, will remove GitHub default labels that do not appear in the labels vector (presumably defaults that aren't relevant to your workflow).

auth_token

Provide a personal access token (PAT) from https://github.com/settings/tokens. If NULL, will use the logic described in gh::gh_whoami() to look for a token stored in an environment variable. Use browse_github_pat() to help set up your PAT.

host

GitHub API host to use. Override with the endpoint-root for your GitHub enterprise instance, for example, "https://github.hostname.com/api/v3"

Label usage

Labels are used as part of the issue-triage process, designed to minimise the time spent re-reading issues. The absence of a label indicates that an issue is new, and has yet to be triaged.

  • reprex indicates that an issue does not have a minimal reproducible example, and that a reply has been sent requesting one from the user.

  • bug type, indicates an unexpected problem or unintended behavior.

  • feature type, indicates a feature request or enhancement.

  • docs type, indicates an issue with the documentation.

  • performance indicates a non-breaking area related to performance.

  • wip indicates that someone else is working on it or has promised to.

  • good first issue indicates a good issue for first-time contributors.

  • help wanted indicates that a maintainer wants help on an issue.

Examples

# NOT RUN {
## typical use in, e.g., a new tidyverse project
use_github_labels(delete_default = TRUE)
# }