aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorShinigami <[email protected]>2023-09-20 15:39:39 +0200
committerGitHub <[email protected]>2023-09-20 15:39:39 +0200
commitda423b6e18431768e70bca79e054a4075e1309d8 (patch)
tree5587bc3d6b55f53de46f85df5d3ff6c031290b90 /.github/workflows
parentfd6557e4b3716ebe41aa38a58b4ae112e6baf0d2 (diff)
downloadfaker-da423b6e18431768e70bca79e054a4075e1309d8.tar.xz
faker-da423b6e18431768e70bca79e054a4075e1309d8.zip
ci: check mergable by label (#2405)
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/check-mergable-by-label.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/.github/workflows/check-mergable-by-label.yml b/.github/workflows/check-mergable-by-label.yml
new file mode 100644
index 00000000..db40f025
--- /dev/null
+++ b/.github/workflows/check-mergable-by-label.yml
@@ -0,0 +1,31 @@
+name: PR Labels
+
+on:
+ pull_request:
+ types:
+ - opened
+ - reopened
+ - synchronize
+ - edited
+ - labeled
+ - unlabeled
+
+permissions: {}
+
+jobs:
+ fail-by-blocking-label:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check for blocking labels
+ run: |
+ BLOCKING_LABELS=("do NOT merge yet" "s: on hold")
+ PR_LABELS=$(jq -r '.pull_request.labels[].name' "$GITHUB_EVENT_PATH")
+
+ for LABEL in "${BLOCKING_LABELS[@]}"; do
+ if [[ "$PR_LABELS" == *"$LABEL"* ]]; then
+ echo "This PR has a blocking label: $LABEL"
+ exit 1
+ fi
+ done
+
+ echo "No blocking labels found"