-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically close draft PRs after a period of inactivity #8093
Comments
I like this. I think you can raise a (draft :) PR for this / get enough maintainers to say yes? |
I raised a (draft) PR for it - #8176 In future, we can also utilize this with issues. The action in the draft PR (#8176) provides a ton of options like excluding assigned issues and PRs, label exclusion/inclusion - https://github.com/marketplace/actions/close-stale-issues. |
@kotwanikunal Just missed your comment, but I created a PR as well :) To answer your question, I don't think we need to consider the "draft" status and can just label and close PRs based on a period of inactivity. |
Shall we do the same logic for PRs that are failing gradle check and have been idle for a while? |
This workflow is for all the PRs in the repo. Any PR that is idle for a while will be labeled and then closed within the thresholds specified (30 days for stale label, 7 days post that for closure) |
Yeah, that make sense. The implemented logic is generic and cover all cases. Thanks Kunal for the clarification. |
So it seems like this worked, sort of? https://github.com/opensearch-project/OpenSearch/pulls?q=is%3Apr+is%3Aopen+label%3Astalled It labelled 6 PRs as stalled. But taking a random example, #6336 was last updated in February as far as I can tell but it did not get labelled. |
I think we might need to configure the max operations limit - https://github.com/marketplace/actions/close-stale-issues#operations-per-run |
Seem the workflow is working as expected, we have 13 staled PRs closed so far |
Is your feature request related to a problem? Please describe.
We currently have 33 open draft PRs, with the oldest ones over a year old and no recent activity. It's great to iterate on a draft or seek feedback on a rough prototype, but drafts should either be promoted to a real PR with an intent to be merged, or closed (possibly to live on as a working branch in a user fork until the code is ready for review) after some relatively brief period.
Describe the solution you'd like
Automatically close draft PRs after a set period of inactivity. Closing is a non-destructive action and can be reversed simply by reopening the PR. A quick duckduckgo search found a GitHub action to automate this: https://github.com/marketplace/actions/draft-pr-closer. There may be other options as well.
Describe alternatives you've considered
Do nothing and leave the draft PRs open until someone takes action.
/cc @anasalkouz @mch2
The text was updated successfully, but these errors were encountered: