CI: configure stale automation

This commit is contained in:
Shadow
2026-02-09 23:37:02 -06:00
parent 1d46ca3a95
commit e7f0769c82
3 changed files with 65 additions and 2 deletions

View File

@@ -73,6 +73,18 @@ jobs:
? label === "r: testflight"
: label?.name === "r: testflight",
);
const hasSecurityLabel = (issue.labels ?? []).some((label) =>
typeof label === "string" ? label === "security" : label?.name === "security",
);
if (title.toLowerCase().includes("security") && !hasSecurityLabel) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: ["security"],
});
return;
}
if (title.toLowerCase().includes("testflight") && !hasTestflightLabel) {
await github.rest.issues.addLabels({
owner: context.repo.owner,