Skip to content

Add a GitHub action to block merging based on the labels #8

Add a GitHub action to block merging based on the labels

Add a GitHub action to block merging based on the labels #8

Workflow file for this run

name: "Check labels"
on:
pull_request:
branches: [ "master" ]
types:
- opened
- synchronize
- labeled
- unlabeled
- enqueued
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