Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughWalkthroughAdds a new GitHub Actions workflow that runs daily (and on manual dispatch) to mark issues and pull requests stale after 30 days of inactivity and close them after a further 14 days, using the actions/stale action pinned to a commit and processing up to 100 items per run. Changes
Sequence Diagram(s)sequenceDiagram
participant Scheduler as "GitHub Scheduler\n(cron / workflow_dispatch)"
participant Runner as "Actions Runner\n(ubuntu-latest)"
participant StaleAction as "actions/stale\n(pinned commit)"
participant Repo as "Repository\nIssues & PRs"
Scheduler->>Runner: trigger workflow
Runner->>StaleAction: execute with config (30d stale, 14d close, messages, ops limit)
StaleAction->>Repo: list issues & PRs (up to 100)
StaleAction->>Repo: add/replace stale labels and post stale messages
StaleAction->>Repo: remove stale on update (if applicable)
StaleAction->>Repo: close stale items after additional 14 days
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/close-stale.yml:
- Line 17: Replace the floating tag reference "actions/stale@v9" with a pinned
immutable commit SHA by changing the uses line to "uses:
actions/stale@<COMMIT_SHA>" (where <COMMIT_SHA> is the full 40-char commit hash
for the actions/stale repo); ensure the SHA points to the intended release
commit and update dependency management (Dependabot/Renovate) to keep that
pinned SHA current.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ea41e564-6b09-43f8-94e3-fcc889621b49
📒 Files selected for processing (1)
.github/workflows/close-stale.yml
There was a problem hiding this comment.
🧹 Nitpick comments (2)
.github/workflows/close-stale.yml (2)
18-25: Consider adding exempt labels to protect long-lived tracking issues.Without
exempt-issue-labels/exempt-pr-labels(e.g.pinned,security,roadmap,good first issue), legitimately long-running items risk being auto-closed on the first run — especially given the backlog of 20 already-stale PRs that will all be picked up in the initial sweep (operations-per-run: 100).Proposed addition
days-before-stale: 30 days-before-close: 14 remove-stale-when-updated: true + exempt-issue-labels: 'pinned,security,roadmap' + exempt-pr-labels: 'pinned,security,dependencies' + exempt-draft-pr: true stale-issue-label: 'stale'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/close-stale.yml around lines 18 - 25, Add exempt label configuration to the close-stale workflow so long-lived tracking issues/PRs aren't auto-closed on the initial sweep: update the job inputs (the block containing days-before-stale, days-before-close, remove-stale-when-updated, stale-issue-label, stale-pr-label, close-issue-label, close-pr-label) to include exempt-issue-labels and exempt-pr-labels with a comma-separated list of labels to protect (e.g., pinned, security, roadmap, good first issue); keep operations-per-run and other settings unchanged so the exempt labels are applied while retaining the current run limits.
24-25: Removeclose-issue-labelandclose-pr-labelor use a distinct label.Setting these to
'stale'is redundant. Thestale-*-labeloptions already add thestalelabel when items are marked stale. Theclose-*-labeloptions are intended to distinguish items at closure time with a different label (e.g.,'closed-stale'). If the intent is simply to close items markedstale, remove these lines; if a distinct closure marker was intended, use a different label value.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/close-stale.yml around lines 24 - 25, The workflow currently sets close-issue-label and close-pr-label to 'stale', which is redundant with the stale-issue-label/stale-pr-label behavior; remove the close-issue-label and close-pr-label entries from the workflow or replace their values with a distinct closing label (e.g., 'closed-stale') so closure uses a different marker. Locate the keys close-issue-label and close-pr-label in the close-stale.yml and either delete those two lines or change their string values to the desired distinct label.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/close-stale.yml:
- Around line 18-25: Add exempt label configuration to the close-stale workflow
so long-lived tracking issues/PRs aren't auto-closed on the initial sweep:
update the job inputs (the block containing days-before-stale,
days-before-close, remove-stale-when-updated, stale-issue-label, stale-pr-label,
close-issue-label, close-pr-label) to include exempt-issue-labels and
exempt-pr-labels with a comma-separated list of labels to protect (e.g., pinned,
security, roadmap, good first issue); keep operations-per-run and other settings
unchanged so the exempt labels are applied while retaining the current run
limits.
- Around line 24-25: The workflow currently sets close-issue-label and
close-pr-label to 'stale', which is redundant with the
stale-issue-label/stale-pr-label behavior; remove the close-issue-label and
close-pr-label entries from the workflow or replace their values with a distinct
closing label (e.g., 'closed-stale') so closure uses a different marker. Locate
the keys close-issue-label and close-pr-label in the close-stale.yml and either
delete those two lines or change their string values to the desired distinct
label.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 72f19c1e-8c90-4562-8e07-99f5923e5ff8
📒 Files selected for processing (1)
.github/workflows/close-stale.yml
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🧭 Context
We currently have 20 stale PRs, some of which were created 3+ months ago and have been tagged as stale for more than 2 weeks. I think we need an automated way to deal with these issues and PRs to keep our repository tidy. ✨
📚 Description
It uses the built-in GitHub stale action to automate the entire stale-tagging process and auto-close PRs 14 days after they are tagged.
Issues or PRs will be tagged after 30 days and automatically closed 14 days later.