diff --git a/.github/workflows/stale-backlog-caller.yml b/.github/workflows/stale-backlog-caller.yml new file mode 100644 index 0000000..022bb5c --- /dev/null +++ b/.github/workflows/stale-backlog-caller.yml @@ -0,0 +1,33 @@ +name: Close stale backlog issues + +# THIN CALLER (backend#1979). The sweep used to be a 16-way copy of +# `actions/stale`, which could not be given board awareness: eligibility has to +# read the card's `Status`, and a script cannot be maintained as sixteen +# byte-identical copies (backend#1597 item 1). +# +# The reusable it calls replaces `actions/stale` with `stale-backlog.py`, whose +# eligibility is exactly `Backlog` — so a `North Stars` epic, or anything already +# in the pipeline, can no longer be auto-closed by a sweep that could not see +# which column it was in. +# +# NO INPUTS PASSED ON PURPOSE. Every input the callee declares is defaulted +# (`project-number: 2`, `dry-run: false`, `strict: false`, `script-ref: main`), +# and a caller may only pass inputs the `@main` callee declares — passing one it +# does not have kills the run at startup_failure, which is why the callee had to +# land on `main` before these callers could be armed at all. +on: + schedule: + - cron: '0 0 * * 1' # Mondays 00:00 UTC + workflow_dispatch: {} + +# `contents: read` only. The sweep's writes go through the App token minted +# inside the reusable, not through GITHUB_TOKEN — and asking for more here than +# the callee needs would exceed a minimal grant and fail the run at startup with +# no jobs (the same constraint code-quality.yml documents). +permissions: + contents: read + +jobs: + stale: + uses: tracebloc/.github/.github/workflows/stale-backlog.yml@main + secrets: inherit diff --git a/.github/workflows/stale-backlog.yml b/.github/workflows/stale-backlog.yml deleted file mode 100644 index 14d689e..0000000 --- a/.github/workflows/stale-backlog.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Close stale backlog issues - -on: - schedule: - - cron: '0 0 * * 1' # Mondays 00:00 UTC - workflow_dispatch: {} - -permissions: - issues: write - pull-requests: write - -jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0 - with: - days-before-issue-stale: 42 # 6 weeks of no activity → warning - days-before-issue-close: 14 # +2 weeks of silence → close - stale-issue-label: 'stale' - stale-issue-message: | - 👋 This issue has had no activity for 6 weeks. - - If it's still relevant, please leave a comment with current context (or assign someone). Otherwise it will auto-close in 2 weeks. - - To exempt permanently, add the `keep-open` label. - close-issue-message: | - Closing due to 8+ weeks of inactivity. Please reopen with current context if relevant. - exempt-issue-labels: 'keep-open,blocked' - # PRs: don't auto-stale — branch protection + active reviews govern those - days-before-pr-stale: -1 - days-before-pr-close: -1 - operations-per-run: 50