Skip to content

Commit bbb994d

Browse files
committed
WIP
1 parent 203b307 commit bbb994d

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
@@ -28,9 +28,11 @@ jobs:
2828
- name: Check out the repo
2929
uses: actions/checkout@v2
3030

31-
- name: Extract PR number from branch name
31+
- name: Get PR number
3232
run: |
33-
PR_NUMBER=$(echo ${GITHUB_REF#refs/heads/pr-})
33+
PR_NUMBER=$(curl --location --request GET 'https://api.github.com/repos/$GITHUB_REPOSITORY/pulls?state=open' \
34+
--header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
35+
| jq '.[] | select(.head.ref=="'${{ github.ref }}'") | .number')
3436
if [ -z "$PR_NUMBER" ]; then
3537
echo "PR_NUMBER is not set. Aborting."
3638
exit 1

0 commit comments

Comments
 (0)