Skip to content

Commit

Permalink
Add Backport PR success comment PR link
Browse files Browse the repository at this point in the history
Adds a direct link (as a comment) to the new backported PR
  • Loading branch information
JackPGreen authored Jan 21, 2025
1 parent 85587e8 commit 20e05c3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/actions/backport/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ runs:
env:
GH_TOKEN: ${{ inputs.GITHUB_TOKEN }}

- name: Report success
shell: ${{ env.shell }}
run: |
gh pr comment "${{ github.event.pull_request.number }}" \
--repo ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} \
--body "👍 Created $(gh pr view --json url --jq .url) to backport into [\`${{ inputs.TARGET_BRANCH }}\`](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/tree/${{ inputs.TARGET_BRANCH }})."
env:
GH_TOKEN: ${{ inputs.GITHUB_TOKEN }

- name: Report errors
shell: ${{ env.shell }}
if: failure() && steps.assert-branch-exists.outputs.failure-already-reported != 'true'
Expand Down

0 comments on commit 20e05c3

Please sign in to comment.