Skip to content

Check Review

Check Review #4462

Workflow file for this run

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/