-
Notifications
You must be signed in to change notification settings - Fork 26
33 lines (27 loc) · 990 Bytes
/
labels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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')