stale-blocked: Apply the stale label so that closed PRs are not locked

This commit is contained in:
bbhtt
2026-03-18 20:23:24 +05:30
parent 1041c53662
commit 53be6607f5
+9
View File
@@ -33,11 +33,14 @@ jobs:
checks for {days} days. It is not ready for inclusion. It is being
automatically closed.
EXEMPT_LABEL: "leave-open"
CLOSE_LABEL: "Stale"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const labelBlocked = process.env.LABEL_BLOCKED || "blocked";
const labelChecks = process.env.LABEL_CHECKS || "pr-check-blocked";
const labelStale = process.env.LABEL_STALE || "Stale";
const daysThreshold = parseInt(process.env.DAYS_THRESHOLD || "14", 10);
const exemptLabel = process.env.EXEMPT_LABEL || "leave-open";
const dryRun = process.env.DRY_RUN === "true";
@@ -155,6 +158,12 @@ jobs:
pull_number: pr.number,
state: "closed"
});
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: [labelStale]
});
}
}
} catch (err) {