[Graph] rename variable and remove non-working codes @open sesame 11/14 19:02 #3839
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Review | |
on: | |
pull_request: | |
types: [opened, edited, reopened, synchronize] | |
pull_request_review: | |
types: [edited, dismissed, submitted] | |
jobs: | |
check_review: | |
runs-on: ubuntu-latest | |
steps: | |
- name: review_count | |
env: | |
PR_NUMBER: ${{ github.event.pull_request.number }} | |
IS_CONTAIN: ${{ contains(github.event.pull_request.labels.*.name, 'Need Review') }} | |
id: review_count | |
run: | | |
review=$(curl -s -H "Accept: application/vnd.github.black-cat-preview+json" \ | |
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews \ | |
| jq '[ .[] | select(.state=="APPROVED") | .user.login ] | unique | length') | |
echo "Number of approved review_count: $review" | |
echo "CONTAIN=$IS_CONTAIN" | |
mkdir -p ./pr | |
echo $PR_NUMBER > ./pr/pr_number | |
echo $review > ./pr/review_num | |
echo $IS_CONTAIN > ./pr/contain_bool | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pr_number | |
path: pr/ |