ci: 👷♂️ fix up stale issue handler #6457
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goals/Scope
There have been issues (#6417) and discussions (#1374) on the topic of maintainers and general entropy within the Issues and Pull Requests. While looking into what automation can be done for this I noticed you already had an Stale Issue workflow on hand, but it doesn't seem to be working.
Looking at the Issue Stale Action it seems that the PAT isn't correctly configured and for some reason the action returns a pass (false positive). While fixing the issue should only require some repository changes I thought I would also align the workflow with the current version from
vercel/nextjs
as there have been updates.Description
For the action, I've mostly broken up the implementations for the Issue and PR handeling so there are more focused degrees of concern.
issue-stale
should only deal with Issues and mark them as stale after 30 days and close after a week.pr-stale
should only deal with PRs and mark them as stale after 3 months and close after a weekThese values can be tweaked depending on your desired retention, but seem reasonable for now.
How to Test
There is a way to run the workflow in dry-run mode, which might be useful for sorting out the CI incase of errors
Comments
@shadcn In order to fix the credential issue with the action you will need to add a PAT to the secrets under the name
STALE_TOKEN
. See Recommended Permission for the scope: