Enable close-stale-contributor-prs.yml workflow (#6615)

Tested on https://github.com/openai/codex/pull/3036
This commit is contained in:
pakrym-oai 2025-11-13 11:50:54 -08:00 committed by GitHub
parent 0792a7953d
commit c95bd345ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,7 +3,7 @@ name: Close stale contributor PRs
on:
workflow_dispatch:
schedule:
- cron: "0 9 * * *"
- cron: "0 6 * * *"
permissions:
contents: read
@ -22,7 +22,7 @@ jobs:
const DAYS_INACTIVE = 14;
const cutoff = new Date(Date.now() - DAYS_INACTIVE * 24 * 60 * 60 * 1000);
const { owner, repo } = context.repo;
const dryRun = true;
const dryRun = false;
const stalePrs = [];
core.info(`Dry run mode: ${dryRun}`);
@ -39,10 +39,12 @@ jobs:
for (const pr of prs) {
const lastUpdated = new Date(pr.updated_at);
if (lastUpdated > cutoff) {
core.info(`PR ${pr.number} is fresh`);
continue;
}
if (!pr.user || pr.user.type !== "User") {
core.info(`PR ${pr.number} wasn't created by a user`);
continue;
}