add gha to label and close stale pull requests#290
add gha to label and close stale pull requests#290kristinmerbach wants to merge 1 commit intotrunkfrom
Conversation
WalkthroughA new GitHub Actions workflow is added to automatically identify and mark issues and pull requests as stale after 30 days of inactivity, running on a daily schedule with custom messages and labels. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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: 2
🧹 Nitpick comments (1)
.github/workflows/stale.yml (1)
20-27: Consider adding additional configuration options.The workflow is missing several useful configuration parameters that could improve stale-management behavior:
Consider adding these options:
- uses: actions/stale@v5 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: "Stale issue message" stale-pr-message: "Stale pull request message" stale-issue-label: "no-issue-activity" stale-pr-label: "no-pr-activity" days-before-stale: 30 + days-before-close: 7 + exempt-draft-prs: true + operations-per-run: 50Rationale:
days-before-close: Specifies how long after marking as stale an item will be closed (gives users a grace period after being warned).exempt-draft-prs: Prevents draft PRs from being marked as stale, as they may be works-in-progress.operations-per-run: Limits the number of API operations per workflow run to avoid hitting GitHub API rate limits with large repositories.Adjust these values based on your repository's needs and policies.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/stale.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/stale.yml
20-20: the runner of "actions/stale@v5" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build-and-upload-image
- GitHub Check: rspec
| pull-requests: write | ||
|
|
||
| steps: | ||
| - uses: actions/stale@v5 |
There was a problem hiding this comment.
🧩 Analysis chain
Update actions/stale to a compatible version.
The static analysis tool (actionlint) flags that actions/stale@v5 is incompatible with the current GitHub Actions runner. This will cause the workflow to fail at runtime.
Please update the action to a more recent version:
- - uses: actions/stale@v5
+ - uses: actions/stale@v10Note: The version number is a suggestion; please verify the latest stable version of the stale action available.
🌐 Web query:
What is the latest stable version of the actions/stale GitHub Action?
💡 Result:
The latest stable version is v10.1.0. [1]
Sources
[1] actions/stale package page on GitHub Packages (shows 10.1.0 as Latest).
Update actions/stale to v10.1.0.
The latest stable version of actions/stale is v10.1.0. The current version v5 in line 20 is incompatible with the current GitHub Actions runner and will cause the workflow to fail at runtime.
- - uses: actions/stale@v5
+ - uses: actions/stale@v10.1.0📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - uses: actions/stale@v5 | |
| - uses: actions/stale@v10.1.0 |
🧰 Tools
🪛 actionlint (1.7.8)
20-20: the runner of "actions/stale@v5" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents
In .github/workflows/stale.yml around line 20, the workflow references
actions/stale@v5 which is incompatible with the current GitHub Actions runner;
update the action to actions/stale@v10.1.0 by replacing the uses value
accordingly and verify any required inputs or minor syntax changes for v10.1.0
(e.g., ensure required tokens or parameters are present) so the workflow runs
without runtime failures.
| stale-issue-message: "Stale issue message" | ||
| stale-pr-message: "Stale pull request message" |
There was a problem hiding this comment.
Replace placeholder messages with actionable, descriptive text.
The stale messages are generic placeholders that don't provide useful information to contributors. Users should understand why their item is marked as stale and what actions they can take to keep it active.
Consider updating the messages with more context:
- stale-issue-message: "Stale issue message"
- stale-pr-message: "Stale pull request message"
+ stale-issue-message: "This issue has been inactive for 30 days. Please add a comment or update the issue if it is still relevant, otherwise it will be closed in 7 days."
+ stale-pr-message: "This pull request has been inactive for 30 days. Please add a comment or make updates if you're still working on it, otherwise it will be closed in 7 days."Customize these messages as appropriate for your repository's workflow and community guidelines.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| stale-issue-message: "Stale issue message" | |
| stale-pr-message: "Stale pull request message" | |
| stale-issue-message: "This issue has been inactive for 30 days. Please add a comment or update the issue if it is still relevant, otherwise it will be closed in 7 days." | |
| stale-pr-message: "This pull request has been inactive for 30 days. Please add a comment or make updates if you're still working on it, otherwise it will be closed in 7 days." |
🤖 Prompt for AI Agents
In .github/workflows/stale.yml around lines 23 to 24, the stale-issue-message
and stale-pr-message are generic placeholders; replace them with actionable,
descriptive messages that explain why the issue/PR is being marked stale, the
timeframe that triggered it, and clear instructions for maintainers/contributors
on how to reactivate it (e.g., provide a status update, reply, or reopen with
new information); ensure messages are concise, reference the inactivity period,
and include a link or reference to contribution guidelines if applicable.
Adding the GHA currently used in enroll to identify and close out old PRs
Summary by CodeRabbit