Skip to content

Commit

Permalink
fix: Fix getting PR number on pull_request_review (#1275)
Browse files Browse the repository at this point in the history
* fix: Fix getting PR number on pull_request_review

* Update integration_tests.yml

* Update integration_tests.yml

* Update integration_tests.yml
  • Loading branch information
piotradamczyk5 authored Oct 28, 2020
1 parent a56e7cc commit 372bdc2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ jobs:
- name: Count approve count
id: reviews
run: |
export count=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/flank/flank/pulls/${{github.event.number}}/reviews -s | grep -i -c '"state": "APPROVED"')
PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
echo $PR_NUMBER
echo $GITHUB_REF
export count=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/flank/flank/pulls/${PR_NUMBER}/reviews -s | grep -i -c '"state": "APPROVED"')
echo $count
echo "::set-output name=approved::${count}"
Expand Down

0 comments on commit 372bdc2

Please sign in to comment.