generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 468
35 lines (29 loc) · 819 Bytes
/
on_pr_updates.yml
File metadata and controls
35 lines (29 loc) · 819 Bytes
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
30
31
32
33
34
35
# Fail PR check if do-not-merge label is present
name: PR requirements
# PROCESS
#
# 1. Verify whether 'do-not-merge' label is present
# 2. Fail PR to prevent merging until resolved
# 3. Pass PR if do-not-merge label is removed by a maintainer
# USAGE
#
# Always triggered on PR labeling changes.
# NOTES
#
# PR requirements are enforced synchronously here.
on:
pull_request:
types:
- opened
- labeled
- unlabeled
permissions: {} # no permission required
jobs:
check-requirements:
runs-on: ubuntu-latest
steps:
- name: Block if it doesn't minimum requirements
if: contains(github.event.pull_request.labels.*.name, 'do-not-merge')
run: |
echo "PR has 'do-not-merge' label. Please resolve the issues mentioned in the PR comments."
exit 1