-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from NordicSemiconductor/label-check-workflow
Add label check workflow
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Check labels | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- labeled | ||
- unlabeled | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check_labels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Required "doc required" or "doc not required" label' | ||
if: > | ||
contains(github.event.pull_request.labels.*.name, 'doc required') == false && | ||
contains(github.event.pull_request.labels.*.name, 'doc not required') == false | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: 'Make sure to add the "doc required" or "doc not required" label. ' | ||
}) | ||
core.setFailed('Required "doc required" or "doc not required" label') | ||