Skip to content

Commit

Permalink
ci(backport): make the backport job carry over the labels from the ma…
Browse files Browse the repository at this point in the history
…in PR

closes kumahq/kuma#10664

Signed-off-by: Krzysztof Słonka <slonka@users.noreply.github.com>
  • Loading branch information
slonka committed Jun 27, 2024
1 parent 3e6820c commit 7ed52e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/wfc_backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ jobs:
git config user.email "${GH_EMAIL}"
- name: cherry-pick
run: |
echo LABELS=${{ matrix.branch }} >> $GITHUB_ENV
INHERITED_LABELS=$(gh pr view --repo kumahq/kuma ${{ env.PR_NUMBER }} --json 'labels' --jq '[ .labels[] | select (.name != "backport") | .name ] | join(",")')
echo LABELS=$INHERITED_LABELS,${{ matrix.branch }} >> $GITHUB_ENV
if git cherry-pick ${{ env.SHA }}; then
echo "Cherry-picked without conflicts!"
else
echo LABELS=${{ matrix.branch }},conflict >> $GITHUB_ENV
echo LABELS=$INHERITED_LABELS,${{ matrix.branch }},conflict >> $GITHUB_ENV
echo "DIFF<<EOF" >> $GITHUB_ENV
echo ":warning: :warning: :warning: Conflicts happened when cherry-picking! :warning: :warning: :warning:" >> $GITHUB_ENV
echo '```' >> $GITHUB_ENV
Expand Down

0 comments on commit 7ed52e2

Please sign in to comment.