Automation to label PRs
This commit is contained in:
parent
82989fdb16
commit
d2942d7805
1 changed files with 27 additions and 0 deletions
27
.github/workflows/pr-labeler.yml
vendored
Normal file
27
.github/workflows/pr-labeler.yml
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Applies labels based on the pull request category
|
||||
name: 🏷️ PR Labeler
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, edited]
|
||||
env:
|
||||
IGNORE_STR: 'Addition / Amendment / Removal / Spelling or Grammar / Website Update / Other'
|
||||
jobs:
|
||||
label-pr:
|
||||
runs-on: ubuntu-latest
|
||||
permissions: write-all
|
||||
steps:
|
||||
- name: Apply Labels
|
||||
if: ${{ !github.event.pull_request.body.includes(env.IGNORE_STR) }}
|
||||
uses: Naturalclar/issue-action@v2.0.2
|
||||
with:
|
||||
title-or-body: both
|
||||
github-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||
parameters: >
|
||||
[
|
||||
{"keywords": ["Addition"], "labels": ["Addition"] },
|
||||
{"keywords": ["Amendment"], "labels": ["Amendment"] },
|
||||
{"keywords": ["Removal"], "labels": ["Removal"] },
|
||||
{"keywords": ["Spelling or Grammar"], "labels": ["Grammar"] },
|
||||
{"keywords": ["Website Update"], "labels": ["Website"] },
|
||||
{"keywords": ["Misc"], "labels": ["Misc"] }
|
||||
]
|
Loading…
Reference in a new issue