Optimize github anno-prs
and github checkout-prs
for the case of 500+ PRs in a repo
#1040
Labels
github anno-prs
and github checkout-prs
for the case of 500+ PRs in a repo
#1040
As for now, all PRs are first fetched, even for
git machete github checkout-prs <single-PR-number>
, for the sake of traversing the PR chain upwards. This takes time due to the pagination limits (100 PRs at most in a single page, as of Sep 2023).This is rather hard to optimize reasonably... we can consider fetching PRs for the matching set of head branches and/or author (only first match the PRs that have the given author).
/search/issues
(v3) REST API cannot be used for that purpose as it does not include PR-specific fields that we can't do without (like head and base branches), only the stuff that's common to issues and PRs. Also, there's no/search/pulls
.Sample relevant v3 query:
Thus, our only chance is GraphQL (v4) API. A sample query:
where
query.graphql
has:The text was updated successfully, but these errors were encountered: