A GitHub Action to add bulk labels when creating a new issue.
This GitHub Action runs when an issues
event webhook is fired in your GitHub repo. The action checks if there is an array of bulk labels to add [aaa, bbb, ccc]
in markdown in the issue's description on a new line. The action works with existing labels defined in your GitHub repo; the labeler expects the first 3 characters of the label name (ex. hel
for a "help wanted" label). If there is 1 or > bulk labels, the action labels the issue with the specified label(s).
Example of a new issue with an array of bulk labels in the issue's description:
Example of the issue after the bulk labels are added to the issue:
To use this GitHub Action, you must have access to GitHub Actions. GitHub Actions are currently only available in private beta (you must apply for access) and only work in private repos.
To setup this action:
- Create a
.github/worksflows/main.yml
in your GitHub repo (more info). - Add the following code to the
main.yml
file and commit it to the repo'smaster
branch.
name: Bulk Issue Labeler
on: issues
jobs:
labelIssue:
name: Bulk Issue Labeler
runs-on: ubuntu-latest
steps:
- uses: tinkurlab/issue-labeler-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- Whenever you create an issue, the action will run!
If you have suggestions for how this GitHub Action could be improved, or want to report a bug, open an issue! Or pull request! We'd love all and any contributions. For more, check out the Contributing Guide.
ISC © 2022 Adam Zolyak [email protected] (www.tinkurlab.com)