Skip to content

Commit

Permalink
ci: Wrap into quotes (#315)
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Koenig <[email protected]>
  • Loading branch information
ko3n1g authored Sep 25, 2024
1 parent 7eb807f commit c23c40d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cherry-pick-release-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,34 +84,34 @@ jobs:
"body": $BODY
}'
)

REPOSITORY=${{ github.repository }}
NEW_PR=$(curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GH_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/pulls \
-d $PAYLOAD)
https://api.github.com/repos/$REPOSITORY/pulls \
-d "$PAYLOAD")

NEW_PR_ID=$(echo -E $NEW_PR | jq '.number')
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GH_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/pulls/$NEW_PR_ID/requested_reviewers \
https://api.github.com/repos/$REPOSITORY/pulls/$NEW_PR_ID/requested_reviewers \
-d '{"reviewers":["'$AUTHOR'"]}'

curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GH_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/issues/$NEW_PR_ID/labels \
https://api.github.com/repos/$REPOSITORY/issues/$NEW_PR_ID/labels \
-d '{"labels":["Run CICD"]}'

else
URL="https://github.com/${{ github.repository }}/pull/$PR_ID"
URL="https://github.com/$REPOSITORY/pull/$PR_ID"

MESSAGE='{
"blocks": [
Expand Down

0 comments on commit c23c40d

Please sign in to comment.