github-api icon indicating copy to clipboard operation
github-api copied to clipboard

Add more methods to QueryBuilder

Open rnveach opened this issue 10 months ago • 4 comments

GHPullRequestQueryBuilder doesn't seem to support pageSize(int) but GHIssueQueryBuilder does.

I don't know if there is a technical reason, but it would help to support repos with a large number of PRs. I didn't realize this was a possibility at first and took a long time to start iterating through issues.

GHIssueQueryBuilder seems to still pull in PRs. Is it possible to add another method to the query to drop PRs from Issue queries and the same for Issues from PR queries. It would help the amount of data to transfer from the server if the server supported it.

rnveach avatar Feb 14 '25 18:02 rnveach

@bitwiseman Would number 2 be pulls? https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28

Also, if I modify the test AppTest#testQueryIssues, how do I overcome the request not matched failure?

rnveach avatar Feb 16 '25 01:02 rnveach

When you modify the test, you will need to rerecord the wiremock data, or manually modify the data files. If you plan to do this, I will invite you to be a member of the hub4j-test org to be able to record.

bitwiseman avatar Feb 16 '25 22:02 bitwiseman

I am willing to give this a try. I can make the production changes, it is just the tests I am not sure about.

rnveach avatar Feb 17 '25 15:02 rnveach

Give it a try and if you get stuck submit the PR anyway and we can discuss from there.

bitwiseman avatar Feb 18 '25 05:02 bitwiseman