Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: check mergable by label #2405

Merged
merged 12 commits into from Sep 20, 2023
30 changes: 30 additions & 0 deletions .github/workflows/check-mergable-by-label.yml
Shinigami92 marked this conversation as resolved.
Show resolved Hide resolved
@@ -0,0 +1,30 @@
name: Check mergable by label
Shinigami92 marked this conversation as resolved.
Show resolved Hide resolved

on:
pull_request:
types:
- opened
- reopened
- synchronize
- edited
Shinigami92 marked this conversation as resolved.
Show resolved Hide resolved
- labeled
- unlabeled

jobs:
fail-by-do-not-merge-label:
runs-on: ubuntu-latest
steps:
- name: Fail if PR is labeled do NOT merge yet
if: contains(github.event.pull_request.labels.*.name, 'do NOT merge yet')
run: |
echo "This PR is labeled as do NOT merge yet!"
exit 1

fail-by-on-hold-label:
runs-on: ubuntu-latest
steps:
- name: Fail if PR is labeled on hold
if: contains(github.event.pull_request.labels.*.name, 's:\ on hold')
run: |
echo "This PR is labeled as on hold!"
exit 1