We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 203b307 commit bbb994dCopy full SHA for bbb994d
.github/workflows/deploy-to-control-plane-review.yml
@@ -28,9 +28,11 @@ jobs:
28
- name: Check out the repo
29
uses: actions/checkout@v2
30
31
- - name: Extract PR number from branch name
+ - name: Get PR number
32
run: |
33
- PR_NUMBER=$(echo ${GITHUB_REF#refs/heads/pr-})
+ 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')
36
if [ -z "$PR_NUMBER" ]; then
37
echo "PR_NUMBER is not set. Aborting."
38
exit 1
0 commit comments