Add "recentmerged" sort option for pulls API #34171
Labels
topic/api
Concerns mainly the API
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
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: