Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(backport): make the backport job carry over the labels from the main PR #129

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ${{ github.repository }} ${{ env.PR_NUMBER }} --json 'labels' --jq '[ .labels[] | select (.name != "backport") | .name ] | join(",")')
echo LABELS=$INHERITED_LABELS,${{ matrix.branch }} >> $GITHUB_ENV
slonka marked this conversation as resolved.
Show resolved Hide resolved
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