Skip to content

Commit

Permalink
Re-add the labeled event
Browse files Browse the repository at this point in the history
  • Loading branch information
oxve committed Nov 14, 2023
1 parent 48a403c commit b35bb2f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/label-cherry-pick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Label Cherry Pick
on:
pull_request_target:
types:
- labeled
- closed

jobs:
Expand All @@ -19,9 +20,16 @@ jobs:
env:
PR_LABELS: ${{ toJson(github.event.pull_request.labels) }}
EVENT_ACTION: ${{ github.event.action }}
LABEL_NAME: ${{ github.event.label.name }}
BASE_REF: ${{ github.base_ref }}
run: |
labels=$(echo "$PR_LABELS" | jq -r '.[].name')
if [[ $EVENT_ACTION == 'closed' ]]; then
# Get a list of the labels from the PR.
labels=$(echo "$PR_LABELS" | jq -r '.[].name')
else
# Or get the label that was added on the merged PR.
labels=$LABEL_NAME
fi
branches=("24.lts.1+" "23.lts.1+" "22.lts.1+" "21.lts.1+" "20.lts.1+" "19.lts.1+" "rc_11" "COBALT_9")
filtered_branches=()
Expand Down

0 comments on commit b35bb2f

Please sign in to comment.