Skip to content

Commit e043485

Browse files
committed
WIP
1 parent 1c6d90b commit e043485

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/deploy-to-control-plane-review.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ jobs:
3131
- name: Get PR number
3232
run: |
3333
echo "GITHUB_REPOSITORY: \"$GITHUB_REPOSITORY\""
34-
echo "github.ref: \"$GITHUB_REF\""
34+
REF=${{ github.ref }}
35+
REF=${REF#refs/heads/} # Remove 'refs/heads/' prefix
36+
echo "REF: \"$REF\""
3537
API_RESPONSE=$(curl --location --request GET "https://api.github.com/repos/$GITHUB_REPOSITORY/pulls?state=open" \
3638
--header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}')
3739
echo "API_RESPONSE: $API_RESPONSE"
38-
PR_NUMBER=$(echo $API_RESPONSE | jq '.[] | select(.head.ref=="'${{ github.ref }}'") | .number')
40+
PR_NUMBER=$(echo $API_RESPONSE | jq '.[] | select(.head.ref=="'$REF'") | .number')
3941
echo "PR_NUMBER: $PR_NUMBER"
4042
if [ -z "$PR_NUMBER" ]; then
4143
echo "PR_NUMBER is not set. Aborting."

0 commit comments

Comments
 (0)