Skip to content

Commit

Permalink
Merge pull request #126 from NordicSemiconductor/label-check-workflow
Browse files Browse the repository at this point in the history
Add label check workflow
  • Loading branch information
aadnekar authored Jan 22, 2024
2 parents a5eb9c4 + d1c74af commit d90d9f0
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/labels.yml
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')

0 comments on commit d90d9f0

Please sign in to comment.