-
Notifications
You must be signed in to change notification settings - Fork 377
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
Add an option to sort PRs by "least recently updated" #1039
Comments
Hello, @ljflores ! Thank you for creating the issue - we will investigate it and see what can be done :) |
Hello, @ljflores The action already has ascending input that seems to implement the requested functionality. The main branch also includes the PR #1033 that introduces the "continuation" of the job from the point where it was left by the previous job. You can take advantage of it right now:
Does it solve the problem? |
Hey @dsame, the Do you know when it will reach a stable version? |
Hello @ljflores! |
Thanks @MaksimZhukov, sure! I am okay with this issue being closed. |
Thank you @ljflores , i am closing the issue according to your answer |
Description:
It would be good to add another sorting option like
ascending
that could sort the PRs by "least recently updated". Even if a PR is very old, it may have been recently updated by the author. I would much rather process a newer PR that was last updated years ago than an older PR that had a very recent update.GitHub already offers this sorting option in the PR interface ("Sort" --> "Least recently updated", also known as "sort:updated-asc").
Here is an example of how the stale bot's
ascending
option currently sorts PRs, using GitHub's "Sort" --> "Oldest" filter:https://github.com/ceph/ceph/pulls?q=is%3Apr+is%3Aopen+sort%3Acreated-asc
And here is an example of how a hypothetical
least-recently-updated
sorting option would work in the stale bot, using GitHub's "Sort" --> "Least recently updated" filter:https://github.com/ceph/ceph/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-asc
Justification:
Adding this sorting option would make the stale bot a lot more efficient in certain use cases. For instance, the Ceph repository (https://github.com/ceph/ceph/pulls) has nearly 800 PRs open right now. Even though the stale bot is set to 100
operations-per-run
, the bot only processes up to 200 PRs at a time. There are some PRs that haven't been updated for many years in the Ceph repository, but since they are not the oldest PRs, the bot doesn't process them right away. We care about closing "least recently updated PRs" first, regardless of the PR's age.Are you willing to submit a PR?
I would open a PR, but I'm not sure where to start or if this is possible. If someone has guidance on whether this option is possible and/or where to edit the code base, I can take a stab at it.
The text was updated successfully, but these errors were encountered: