diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index e2d1178..c17e25c 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -18,21 +18,13 @@ jobs: steps: - name: Fetch recent PR numbers run: | - prs_raw=$(gh pr list --base "new-pr" -L 100 --state open --json number,createdAt,isDraft \ + prs_raw=$(gh pr list --base "new-pr" -L 50 --state open --json number,createdAt,isDraft \ | jq -r '[.[] | select(.isDraft == false - and .createdAt >= (now - (1 * 24 * 60 * 60) | todate)) + and .createdAt >= (now - (2 * 24 * 60 * 60) | todate)) | .number] | .[]') - - unreviewed_prs=() - while IFS= read -r pr_num; do - review_count=$(gh pr view "$pr_num" --json reviews -q '.reviews | length') - if [ "$review_count" -eq 0 ]; then - unreviewed_prs+=("$pr_num") - fi - done <<< "$prs_raw" - prs_list=$(printf '%s\n' "${unreviewed_prs[@]}" | head -30 | paste -sd "," -) + prs_list=$(printf '%s\n' $prs_raw | head -30 | paste -sd "," -) echo "PR_LIST=$prs_list" >> "$GITHUB_ENV" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}