pr-check: Set a cutoff date

This commit is contained in:
bbhtt
2025-06-30 08:56:45 +05:30
parent 0397fee1be
commit cd3114e686
+4 -2
View File
@@ -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 == []))
)