mirror of
https://github.com/stan220/flathub.git
synced 2026-09-08 16:28:52 +00:00
stale-blocked: Apply the stale label so that closed PRs are not locked
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user