create_label: Create an issue label in a repository

Description Usage Arguments Details Value Examples

View source: R/labels.R

Description

This function creates a new label for issues and pull requests for the specified repository in GitHub. It can also be used to set the colour and description.

Usage

1
create_label(name, repo, description, color = random_color(), ...)

Arguments

name

(string) The name of the label.

repo

(string) The repository specified in the format: owner/repo.

description

(string, optional) A description of the label.

color

(string, optional) Either the color name (see grDevices::colors()) or a hexidecimal color code (see color-hex.com). If not supplied a color is chosen at random.

...

Parameters passed to gh_request().

Details

For more details see the GitHub API documentation:

Value

create_label() returns a list of the label's properties.

Label Properties:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 

  create_label(
    name        = "new-label",
    repo        = "ChadGoymer/githapi",
    color       = "blue",
    description = "This is a detailed label"
  )


## End(Not run)

ChadGoymer/githapi documentation built on Oct. 22, 2021, 10:56 a.m.