Skip to content

Add GitHub Actions workflow to auto-close stale maintainer-scrap issues#1500

Merged
dyoshikawa merged 2 commits intomainfrom
codex/add-github-actions-to-auto-close-stale-issues
Apr 17, 2026
Merged

Add GitHub Actions workflow to auto-close stale maintainer-scrap issues#1500
dyoshikawa merged 2 commits intomainfrom
codex/add-github-actions-to-auto-close-stale-issues

Conversation

@dyoshikawa
Copy link
Copy Markdown
Owner

Motivation

  • Reduce manual triage by automatically closing issues labeled maintainer-scrap that have not been updated for a month.
  • Provide a safe, auditable scheduled job that maintainers can also trigger manually.

Description

  • Add a new workflow file at .github/workflows/auto-close-maintainer-scrap-issues.yml that runs daily (UTC 00:00) and supports workflow_dispatch manual runs.
  • Use actions/github-script@v8 to list open issues with the maintainer-scrap label, skip pull requests, and close issues whose updated_at is >= 30 days old while logging actions.
  • Grant minimal permissions required (contents: read, issues: write).

Testing

  • Ran pnpm cicheck, which includes formatting, linting, type checks, unit tests, and content checks, and it completed successfully.
  • The test suite ran via vitest and reported all tests passing (4901 tests passed).
  • Content checks (cspell and secretlint) completed successfully as part of pnpm cicheck.

Codex Task

Copilot AI review requested due to automatic review settings April 16, 2026 15:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a scheduled GitHub Actions workflow to reduce maintainer triage by automatically closing stale issues labeled maintainer-scrap, with an option to trigger the job manually.

Changes:

  • Introduces a new scheduled + manual workflow to scan open maintainer-scrap issues.
  • Filters out pull requests and closes issues whose updated_at is ≥ 30 days old.
  • Uses minimal repository permissions (contents: read, issues: write) and logs each action.

runs-on: ubuntu-latest
steps:
- name: Close stale maintainer-scrap issues
uses: actions/github-script@v8
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actions/github-script is referenced by a mutable tag (@v8). In this repo, workflows pin actions to an exact commit SHA for supply-chain security and reproducibility (e.g., actions/checkout@<sha> in other workflows). Please pin actions/github-script to a full-length commit SHA (with an inline comment noting the corresponding version).

Suggested change
uses: actions/github-script@v8
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v8

Copilot uses AI. Check for mistakes.
@dyoshikawa dyoshikawa merged commit 38589b8 into main Apr 17, 2026
11 checks passed
@dyoshikawa dyoshikawa deleted the codex/add-github-actions-to-auto-close-stale-issues branch April 17, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants