From 81095f0f9dceb05bf4eae6e759292c2c89e9674c Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Wed, 17 Apr 2024 15:29:02 -0700 Subject: [PATCH] [ci] Stop copying body over to backports in backport-fixup (#4005) --- .github/workflows/backport-fixup.yml | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/.github/workflows/backport-fixup.yml b/.github/workflows/backport-fixup.yml index cc33eeb12df..7e591c42f36 100644 --- a/.github/workflows/backport-fixup.yml +++ b/.github/workflows/backport-fixup.yml @@ -1,5 +1,7 @@ # Fixes up Mergify-created backport PRs to include necessary labels and other -# information for release notes generation +# information for release notes generation. +# This action formerly copied over the PR body but it seems Mergify does that +# itself now. name: Backport Fixup @@ -66,25 +68,3 @@ jobs: # Long line but the paste joining must be done right away or we run into issues with spaces in labels LABELS=$(gh pr view --json labels --jq '.labels | .[].name | select(. != "Backported")' $ORIG_PR | paste -sd "," -) gh pr edit $BP_PR --add-label "$LABELS" - - name: Copy over body - env: - GH_TOKEN: ${{ github.token }} - run: | - BP_PR=${{ needs.resolve_prs.outputs.backport_pr }} - ORIG_PR=${{ needs.resolve_prs.outputs.original_pr }} - - gh pr view --json body --jq '.body' $ORIG_PR > orig_body.txt - gh pr view --json body --jq '.body' $BP_PR > bp_body.txt - - if grep -q '# Original PR Body' bp_body.txt; then - # Copy BP PR body but remove original PR body from bottom - sed '/# Original PR Body/q' bp_body.txt > new_bp_body.txt - echo "" >> new_bp_body.txt - else - cp bp_body.txt new_bp_body.txt - echo -e "\n----\n\n# Original PR Body\n" >> new_bp_body.txt - fi - - cat orig_body.txt >> new_bp_body.txt - - gh pr edit $BP_PR --body-file new_bp_body.txt