Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
justin808 committed Jan 16, 2024
1 parent 203b307 commit bbb994d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/deploy-to-control-plane-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v2

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

0 comments on commit bbb994d

Please sign in to comment.