Skip to content

Commit 884b7a5

Browse files
author
Gordon Byers
authored
New workflow: PR auto labeller (#99)
* Adding Label PR workflow * Adding config file for Label PR action * added test and docs to config * Added Labeller to action list in contributing guide
1 parent 91d5232 commit 884b7a5

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

.github/labeler.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Add 'helper-ui' to any changes within 'helper' folder or any subfolders
2+
helper-ui:
3+
- helper/**/*
4+
5+
# Add 'test' label to any change to *.spec.js files
6+
test:
7+
- '*.spec.js'
8+
9+
# Add 'documentation' label to any change to *.md files
10+
documentation:
11+
- '*.md'

.github/workflows/label.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow will triage pull requests and apply a label based on the
2+
# paths that are modified in the pull request.
3+
#
4+
# To use this workflow, you will need to set up a .github/labeler.yml
5+
# file with configuration. For more information, see:
6+
# https://github.com/actions/labeler
7+
8+
name: Labeler
9+
on: [pull_request]
10+
11+
jobs:
12+
label:
13+
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
19+
steps:
20+
- uses: actions/labeler@v2
21+
with:
22+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

CONTRIBUTING.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Various workflows run on Push / PR / Schedule.
1515
| Bicep Build | Every Push | `Quality` To run the bicep linter upon changes to the bicep files |
1616
| Greetings | Issue / PR | `Community` Greeting new contributors to the repo |
1717
| Stale bot | Issue / PR | `Tidy` Marks old issues as stale |
18+
| Labeler | PR | `Tidy` Adds relevant labels to PR's based on files changed |
1819
| Publish Helper | PR | `Quality` Tests changes to the UI work |
1920
| Publish Helper | Push `main` | Publishes the UI to GitHub Pages |
2021
| Check Markdown | PR | `Quality` Checks markdown files for spelling mistakes |

0 commit comments

Comments
 (0)