Files
cozystack/.github/workflows/stale.yaml
T
Alexey Artamonov d6a4835ea5 ci(workflows): run push and schedule workflows only in cozystack/cozystack
A private copy of the repository, used to verify an embargoed security
fix because GitHub runs no CI in an advisory's temporary fork, receives
every workflow file with each sync. Without a repository guard, each
sync and each cron tick there would build, publish, prune and cut
releases with that copy's credentials. Pull request events stay allowed
in the workflows that also check pull requests, since checking the fix
is what the copy is for.

Every job carries the guard rather than only the root jobs, because a
job whose condition calls a status function runs even when the job it
needs was skipped. A contract test holds new push and schedule
workflows to the same rule. It reads 'on' in every form GitHub accepts,
requires whatever follows the guard to be one parenthesized group,
because && binds tighter than || and a trailing '|| (...)' would reopen
the job, and fails on a workflow it cannot parse instead of leaving
that workflow unchecked.

Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
Assisted-by: LLM
2026-11-25 15:49:33 +03:00

60 lines
2.4 KiB
YAML

name: Stale issues
on:
schedule:
- cron: '37 4 * * *' # daily at 04:37 UTC
workflow_dispatch:
# Top-level token defaults to read-only. A job-level block replaces this one
# rather than adding to it, so each job restates every scope it needs.
permissions:
contents: read
concurrency:
group: stale
cancel-in-progress: false
jobs:
stale:
if: github.repository == 'cozystack/cozystack'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0
with:
stale-issue-label: lifecycle/stale
stale-pr-label: lifecycle/stale
close-issue-label: lifecycle/rotten
close-pr-label: lifecycle/rotten
# Exempt lists differ on purpose: issues sit longer than PRs by nature.
# An accepted issue (`triage/accepted`) is a known long-tail task, not stale;
# a held PR (`do-not-merge/hold`) is paused intentionally and shouldn't auto-close.
# Priority/security/regression labels protect issues that someone explicitly
# decided to keep visible.
exempt-issue-labels: >-
lifecycle/frozen,epic,
priority/critical-urgent,priority/important-soon,priority/important-longterm,
security/critical,security/high,security/confirmed,
security/triage-needed,security/in-progress,
triage/accepted,kind/regression
exempt-pr-labels: >-
lifecycle/frozen,do-not-merge/hold
days-before-stale: 60
days-before-close: 14
operations-per-run: 100
remove-stale-when-updated: true
stale-issue-message: |
This issue has had no activity for 60 days and was marked `lifecycle/stale`.
It will be closed in 14 days unless commented or labelled `lifecycle/frozen`.
stale-pr-message: |
This PR has had no activity for 60 days and was marked `lifecycle/stale`.
It will be closed in 14 days unless commented or labelled `lifecycle/frozen`.
close-issue-message: |
Closed because no activity followed the `lifecycle/stale` warning.
Reopen if the issue is still relevant.
close-pr-message: |
Closed because no activity followed the `lifecycle/stale` warning.
Reopen if the change is still wanted.