add workflow to label issues as stale#695
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a scheduled GitHub Actions workflow to automatically mark inactive issues as stale and eventually close them, helping keep issue hygiene consistent across repositories.
Changes:
- Introduces a new scheduled workflow (
stale.yaml) usingactions/stale@v10. - Configures stale/close timings and messages for inactive issues.
- Defines job-level permissions for the stale automation.
| jobs: | ||
| stale: | ||
| permissions: | ||
| actions: write |
There was a problem hiding this comment.
The job requests actions: write, but actions/stale only needs to read/update issues (and optionally pull requests). Granting actions: write is broader than necessary; please remove it to follow least-privilege permissions.
| actions: write |
There was a problem hiding this comment.
This is intentional as its required to clean stale cache. See actions/stale#1248
| permissions: | ||
| actions: write | ||
| issues: write | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/stale@v10 | ||
| with: | ||
| stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. This issue will be closed in 30 days unless new comments are made or the stale label is removed. To skip these checks, apply the "lifecycle/frozen" label.' | ||
| stale-issue-label: 'lifecycle/stale' | ||
| exempt-issue-labels: 'lifecycle/frozen,feature,enhancement' |
There was a problem hiding this comment.
actions/stale processes pull requests by default. This workflow only grants issues: write, so runs may fail when the action tries to label/close PRs. If the intent is issues-only, set only-issues: true (or disable PR handling); otherwise add pull-requests: write permission and configure the PR-specific settings/messages.
There was a problem hiding this comment.
This is incorrect suggestion. There is no only-issues: true option and this workflow is not touching PRs, its only labeling/closing issues here as configured. See https://github.com/actions/stale?tab=readme-ov-file#all-options
If someone wants to label PRs as well in future, those permissions should be set then.
Pull Request Test Coverage Report for Build 22634518209Details
💛 - Coveralls |
ArangoGutierrez
left a comment
There was a problem hiding this comment.
Thanks for the PR, please address copilot comments before we can move on
e760a3b to
ab9ec54
Compare
I've addressed all the issues reported by copilot. PTAL |
Signed-off-by: Rahul Sharma <rahulsharm@nvidia.com>
ab9ec54 to
1ecda89
Compare
Description
This PR adds the workflow which runs periodically and labels issues as stale if there is no activity for a certain period.
Motivation
To keep all our repos in sync on how we handle issues, we are adding this worklow to this repo as well.
Fixes #
Type of Change
Changes Made
Testing
Test Commands Run
Checklist
git commit -s)Additional Notes