Mark draft PRs as stale after 7 days, close after 7 more#21378
Closed
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
Closed
Mark draft PRs as stale after 7 days, close after 7 more#21378devin-ai-integration[bot] wants to merge 3 commits intomainfrom
devin-ai-integration[bot] wants to merge 3 commits intomainfrom
Conversation
Add two custom steps before the actions/stale step to handle draft PRs on a faster schedule: - Mark stale draft PRs: finds open draft PRs inactive for 7 days, adds status:stale label and a comment - Close stale draft PRs: finds draft PRs with status:stale label inactive for 7 days, comments and closes them Draft PRs with status:exempt label are skipped. Non-draft PRs continue to use the existing 14-day schedule via actions/stale. Co-Authored-By: alex.s <ajstreed1@gmail.com>
Co-authored-by: alex.s <alex.s@prefect.io> Co-Authored-By: alex.s <ajstreed1@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-authored-by: alex.s <alex.s@prefect.io> Co-Authored-By: alex.s <ajstreed1@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds two custom
gh-based steps to the stale workflow to handle draft PRs on a faster schedule than the default 14/14 day cycle:status:stalelabel with a comment.status:stalewith no activity for 7 more days, comments, and closes them.Both steps respect the existing
status:exemptlabel. Theactions/stalestep continues to handle non-draft PRs on the existing 14-day schedule. Sinceactions/staledoesn't support filtering by draft status natively, the custom steps usegh pr list --draftwith jq filters instead.Things to verify in review:
insidefilter used for the "not already stale" check — consider whetherany(. == "status:stale") | notwould be clearer and more robust (especially for PRs with no labels, whereinsidemay behave unexpectedly).actions/stalestep to avoid any overlap in processing.updatedAtresets when the stale label is added viagh pr edit, which is what makes the 7-day close window work — worth confirming this assumption.Checklist
<link to issue>"mint.json.Link to Devin session: https://app.devin.ai/sessions/d481a0da7f704d28b2893aa40c454d83
Requested by: @desertaxle