Skip to content

Commit

Permalink
[GH Actions] Create cherry-pick-label-check.yml (#1450)
Browse files Browse the repository at this point in the history
The action fails if there is no cherry-pick-to- label applied to a PR.
  • Loading branch information
FlorianReimold authored Mar 12, 2024
1 parent e2d3db4 commit 06c2128
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/cherry-pick-label-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Cherry Pick Label Check

on:
pull_request:
types:
- labeled
- unlabeled
branches:
- master

jobs:
cherry-pick-label-check:
runs-on: ubuntu-latest

steps:
- name: Check labels
run: |
labels=$(jq -r '.pull_request.labels[].name' $GITHUB_EVENT_PATH)
if [[ ! $labels =~ ^cherry-pick-to- ]]; then
echo "No label starting with 'cherry-pick-to-' found."
exit 1
fi

0 comments on commit 06c2128

Please sign in to comment.