Skip to content

Commit 207e922

Browse files
sachiniyerclaude
andauthored
ci: add workflow to close PRs inactive for 2+ weeks (#253)
## Summary - Adds `.github/workflows/stale.yml` that uses `actions/stale@v9` to close PRs inactive for 14 days (7-day stale warning + 7-day close window). - Mirrors the `usedetail/detail` stale workflow pattern, scaled from 30 → 14 days. - PRs labeled `do-not-close` are exempt. Runs daily at 00:00 UTC; also dispatchable manually. ## Test plan - [ ] Trigger the workflow manually via `workflow_dispatch` and confirm it runs without errors - [ ] Verify an open PR with no `do-not-close` label and no activity for 7+ days gets the `stale` label and warning comment - [ ] Verify a PR labeled `do-not-close` is skipped - [ ] Confirm PRs with activity inside the 14-day window are left alone 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/usedetail/cli/pull/253" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open in Devin Review"> </picture> </a> <!-- devin-review-badge-end --> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 54861b5 commit 207e922

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

‎.github/workflows/stale.yml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Close stale PRs
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
workflow_dispatch:
7+
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
12+
jobs:
13+
stale:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/stale@v9
17+
with:
18+
days-before-pr-stale: 7
19+
days-before-pr-close: 7
20+
stale-pr-message: "This PR has been inactive for 7 days and will be closed in 7 days if there is no activity."
21+
close-pr-message: "Closing this PR due to inactivity. Feel free to reopen if still needed."
22+
stale-pr-label: stale
23+
exempt-pr-labels: do-not-close
24+
operations-per-run: 1000
25+
days-before-issue-stale: -1
26+
days-before-issue-close: -1

0 commit comments

Comments
 (0)