Skip to content

Commit

Permalink
PRT comment adding using curl more standard way (SatelliteQE#12521)
Browse files Browse the repository at this point in the history
PRT comment adding using curl more standtard way
  • Loading branch information
omkarkhatavkar authored and shweta83 committed Apr 10, 2024
1 parent 062274e commit 1551c3f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/auto_cherry_pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,14 @@ jobs:
- name: Add Parent PR's PRT comment to Auto_Cherry_Picked PR's
id: add-parent-prt-comment
if: ${{ always() && steps.cherrypick.outcome == 'success' }}
uses: mshick/add-pr-comment@v2
with:
issue: ${{ steps.cherrypick.outputs.number }}
message: ${{ needs.find-the-parent-prt-comment.outputs.prt_comment }}
repo-token: ${{ secrets.CHERRYPICK_PAT }}
run: |
ISSUE_NUMBER=${{ steps.cherrypick.outputs.number }}
COMMENT_BODY=${{ needs.find-the-parent-prt-comment.outputs.prt_comment }}
curl -X POST -H "Authorization: token ${{ secrets.CHERRYPICK_PAT }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/issues/${ISSUE_NUMBER}/comments" \
-d "{\"body\":\"$COMMENT_BODY\"}"
- name: is autoMerging enabled for Auto CherryPicked PRs ?
if: ${{ always() && steps.cherrypick.outcome == 'success' && contains(github.event.pull_request.labels.*.name, 'AutoMerge_Cherry_Picked') }}
Expand Down

0 comments on commit 1551c3f

Please sign in to comment.