mirror of
https://github.com/google/nomulus.git
synced 2025-07-21 10:16:07 +02:00
Add a GitHub action to block merging based on the labels (#2367)
This commit is contained in:
parent
0f02858965
commit
d0b036227a
1 changed files with 23 additions and 0 deletions
23
.github/workflows/do-not-merge.yml
vendored
Normal file
23
.github/workflows/do-not-merge.yml
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
name: "Check labels"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: ["master"]
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- labeled
|
||||
- unlabeled
|
||||
merge_group:
|
||||
branches: ["master"]
|
||||
types: [checks_requested]
|
||||
|
||||
jobs:
|
||||
fail-by-label:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fail if PR is labeled as "do not merge"
|
||||
if: contains(github.event.pull_request.labels.*.name, 'do not merge')
|
||||
run: |
|
||||
echo "This PR is labeled as do not merge!"
|
||||
exit 1
|
Loading…
Add table
Add a link
Reference in a new issue