Skip to content

Adds labels to an issue. Creates label if it does not exist with a deterministic color.

License

Notifications You must be signed in to change notification settings

benlei/add-labels-deterministically

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

benlei/add-labels-deterministically

GitHub Super-Linter CI Check dist/ CodeQL Coverage

This action will fist try to see if any of the labels you want to add exist in your repository. If it doesn't, it'll try to create it for you with a determinstic color. This will allow you to ensure all your labels with the same name will be consistent across all your repositories.

Then it'll try to add any labels that are not currently present on the issue.

Inputs

Input Name Required Default Description
repository no ${{ github.repository }} The repository to find issue in
token no ${{ github.token }} The GitHub token to use for calling GitHub's API
issue-number yes ${{ github.event.issue.number }} The issue number
labels yes n/a Comma separated list of labels to add to issue/repository. Any label greater than 50 characters will be ignored.
fail-on-error no false Whether or not to fail action if any error occurs

Outputs

N/A

Example

- name: Add Labels
  uses: benlei/add-labels-deterministically@v1
  with:
    issue-number: 3
    labels: foo, bar, baz

About

Adds labels to an issue. Creates label if it does not exist with a deterministic color.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published