foundry-security-spec icon indicating copy to clipboard operation
foundry-security-spec copied to clipboard

ci: add stale issues and PRs workflow

Open santosomar opened this issue 6 months ago • 0 comments

Summary

Add a GitHub Actions workflow (.github/workflows/stale.yml) that automatically marks and closes inactive issues and pull requests using actions/stale.

Motivation

As the repository accumulates issues and PRs, stale items create noise and obscure actionable work. Automating triage:

  • Surfaces inactive items for maintainers to revisit or close.
  • Keeps the backlog focused on items with active discussion.
  • Reduces manual housekeeping for maintainers.

Proposed behavior

  • Runs daily on a cron schedule (33 2 * * * UTC) and can be triggered manually via workflow_dispatch.
  • Marks issues and PRs as stale after 60 days of inactivity.
  • Closes stale items after an additional 7 days of inactivity.
  • Exempts items labeled pinned or security, and any item with an assignee.
  • Caps work at 100 operations per run to stay well under GitHub API rate limits.

Security / supply-chain considerations

  • The third-party action is pinned to a commit SHA (not a mutable tag), per repository supply-chain guidance.
  • permissions: is scoped to the minimum required (issues: write, pull-requests: write); no other token scopes are granted.
  • Uses the built-in GITHUB_TOKEN — no long-lived secrets are introduced.

Acceptance criteria

  • [x] .github/workflows/stale.yml exists and parses as valid YAML.
  • [x] Workflow appears under the repo's Actions tab.
  • [x] Manual workflow_dispatch run completes successfully against the live repo.
  • [x] Action is pinned to a commit SHA with the version recorded in a trailing comment.

santosomar avatar May 12 '26 03:05 santosomar