label

Manage the targeted repository’s labels.

Added in version 1.1.0.

Part of the github resource type: all functions operate on the repository the job was dispatched to. The profile parameter defaults to the profile named in the resource declaration.

saltext.github.resources.github.modules.label.list_(*, fields=None, profile=None)[source]

List the labels of the targeted repository, as a mapping of label name to details.

CLI Example:

salt 'my-org/my-repo' label.list
fields

Only include these fields in the output. A single field name reduces each entry to the field’s value.

profile

Profile configuration name to use. Defaults to the resource declaration’s profile.

saltext.github.resources.github.modules.label.get(name, *, profile=None)[source]

Return the data of a single label of the targeted repository.

CLI Example:

salt 'my-org/my-repo' label.get bug
name

Name of the label.

profile

Profile configuration name to use. Defaults to the resource declaration’s profile.

saltext.github.resources.github.modules.label.add(name, *, color=None, description=None, profile=None)[source]

Create a label in the targeted repository. Returns the data of the created label.

CLI Example:

salt 'my-org/my-repo' label.add release color=00ff00
name

Name of the label.

color

Hexadecimal color code for the label, without the leading #. If unset, GitHub assigns a random one.

description

Short description of the label.

profile

Profile configuration name to use. Defaults to the resource declaration’s profile.

saltext.github.resources.github.modules.label.edit(name, *, new_name=None, color=None, description=None, profile=None)[source]

Update an existing label of the targeted repository. Returns the data of the updated label.

CLI Example:

salt 'my-org/my-repo' label.edit release color=00ff00
name

Current name of the label.

new_name

New name for the label.

color

Hexadecimal color code for the label, without the leading #.

description

Short description of the label.

profile

Profile configuration name to use. Defaults to the resource declaration’s profile.

saltext.github.resources.github.modules.label.remove(name, *, profile=None)[source]

Delete a label from the targeted repository.

CLI Example:

salt 'my-org/my-repo' label.remove release
name

Name of the label.

profile

Profile configuration name to use. Defaults to the resource declaration’s profile.