-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add "recentmerged" sort option for pulls API #34171
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
Comments
If I'm not wrong, that sort option doesn't even exist for the UI yet, correct? Overall, I agree with the idea. |
I think "recentclosed" would work for both and support my use case, because I already check the merged_at attribute to distinguish between closed and merged |
closes go-gitea#34171 Adds a new sort option `recentclose` for issues and pull requests which will return items in a descending order of when they were closed
Backport #34525 by @MarkusAmshove closes #34171 Adds a new sort option `recentclose` for issues and pull requests which will return items in a descending order of when they were closed Co-authored-by: Markus Amshove <[email protected]>
Feature Description
Currently the
/repos/{orga}/{repo}/pulls
endpoint supports the following sort options:I'm trying to get a list of PRs in the order they've been merged, from most recent to oldest.
Since the repository has a lot of PRs and I only want to collect PRs since a certain date (to generate a changelog), the API is called with pagination and the cancellaction condition for pagination is "any merged_at <= certain date".
The problem with my behavior currently is, that this stops at pulls that have been merged a long time ago but have been updated somehow (e.g. someone wrote a comment).
If I remove the
recentupdate
sort criteria, then I could miss old PRs that got merged later.For performance reasons I can't read all PRs from the repository, even with state closed.
To support my use case, it would be great to have a sort type
recentmerged
, or something similar, which returns all PRs in the opposite order they've been merged (newest to oldest).If I oversee a combination of options which would mimic this, I'd appreciate a hint to accomplish my use case :-)
Screenshots
No response
The text was updated successfully, but these errors were encountered: