Add stale.yml workflow for managing inactive issues and PRs#3
Add stale.yml workflow for managing inactive issues and PRs#3JosunLP merged 1 commit intodevelopmentfrom
Conversation
This workflow automatically marks stale issues and pull requests based on inactivity, helping to manage repository maintenance.
There was a problem hiding this comment.
Pull request overview
This PR adds a GitHub Actions workflow to automatically manage stale issues and pull requests based on inactivity. The workflow uses the actions/stale action to periodically check for inactive items and mark them with labels.
Changes:
- Added
.github/workflows/stale.ymlworkflow file that runs daily to identify and label stale issues and PRs
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| stale-issue-label: 'no-issue-activity' | ||
| stale-pr-label: 'no-pr-activity' |
There was a problem hiding this comment.
The label names 'no-issue-activity' and 'no-pr-activity' deviate from the conventional 'stale' label naming pattern commonly used in GitHub repositories. Most projects use labels like 'stale' or 'status: stale' for consistency with GitHub's ecosystem and community expectations. Consider using more conventional label names unless there's a specific reason for this naming choice. Additionally, these labels will need to be created in the repository before the workflow can apply them.
| stale-issue-label: 'no-issue-activity' | |
| stale-pr-label: 'no-pr-activity' | |
| stale-issue-label: 'stale' | |
| stale-pr-label: 'stale' |
| 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' |
There was a problem hiding this comment.
The workflow lacks important optional configurations that are commonly needed for effective stale issue management. Consider adding: 'exempt-issue-labels' and 'exempt-pr-labels' to protect certain issues/PRs from being marked stale (e.g., 'security', 'bug', 'enhancement'), 'close-issue-message' and 'close-pr-message' to explain why items are being closed, and 'operations-per-run' to limit API usage and prevent rate limiting. Without these, the workflow may mark important items as stale or consume excessive API quota.
| stale-pr-label: 'no-pr-activity' | |
| stale-pr-label: 'no-pr-activity' | |
| exempt-issue-labels: 'security,bug,enhancement' | |
| exempt-pr-labels: 'security,bug,enhancement' | |
| close-issue-message: 'Closing this issue due to prolonged inactivity. If this is still a problem, please feel free to reopen or open a new issue.' | |
| close-pr-message: 'Closing this pull request due to prolonged inactivity. If you would like to continue working on this, please reopen or open a new PR.' | |
| operations-per-run: 100 |
| 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' |
There was a problem hiding this comment.
The workflow is missing critical configuration parameters that define when issues and PRs should be marked as stale and when they should be closed. Without 'days-before-stale' and 'days-before-close' parameters, the action will use its default values (60 days before marking as stale, 7 days before closing), which may not align with the repository's maintenance strategy. These parameters should be explicitly configured to make the intended behavior clear and adjustable.
| stale-pr-label: 'no-pr-activity' | |
| stale-pr-label: 'no-pr-activity' | |
| days-before-stale: 60 | |
| days-before-close: 7 |
| stale-issue-message: 'Stale issue message' | ||
| stale-pr-message: 'Stale pull request message' |
There was a problem hiding this comment.
The stale messages are generic placeholders ('Stale issue message' and 'Stale pull request message') that don't provide helpful information to contributors. These messages should be replaced with meaningful text that explains why the issue/PR was marked as stale, what actions contributors can take to prevent closure, and how to reopen if needed. Good stale messages help maintain community engagement and set clear expectations.
| stale-issue-message: 'Stale issue message' | |
| stale-pr-message: 'Stale pull request message' | |
| stale-issue-message: 'This issue has been automatically marked as stale because it has had no recent activity. If this is still relevant, please add a comment or update the issue to keep it open; otherwise it may be closed automatically. If it gets closed and you believe that is in error, you can comment to request that a maintainer reopen it.' | |
| stale-pr-message: 'This pull request has been automatically marked as stale due to a lack of recent activity. Please push new commits, address outstanding review comments, or leave a comment if you would like to keep this PR open; otherwise it may be closed automatically. If it is closed but you are still working on it, you can comment to ask a maintainer to reopen it.' |
This workflow automatically marks stale issues and pull requests based on inactivity, helping to manage repository maintenance.