From cd3114e686d028b4fbb9f508b1c101a59d301a4b Mon Sep 17 00:00:00 2001 From: bbhtt Date: Mon, 30 Jun 2025 08:56:45 +0530 Subject: [PATCH] pr-check: Set a cutoff date --- .github/workflows/pr-check.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 692a791..e3938b7 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -18,11 +18,13 @@ jobs: steps: - name: Fetch recent PR numbers run: | - prs_raw=$(gh pr list --base "new-pr" -L 50 --state open --json number,updatedAt,isDraft,labels \ - | jq -r '[. + CUTOFF_DATE="2025-05-25T00:00:00Z" + prs_raw=$(gh pr list --base "new-pr" -L 50 --state open --json number,createdAt,updatedAt,isDraft,labels \ + | jq -r --arg cutoff "$CUTOFF_DATE" '[. [] | select( .isDraft == false + and .createdAt >= $cutoff and .updatedAt >= (now - (2 * 24 * 60 * 60) | todate) and (all(.labels[].name; . != "Stale") or (.labels == [])) )