Fix: GitHub branch pagination#98
Conversation
Greptile SummaryThis PR implements
Confidence Score: 5/5Safe to merge; changes are additive and well-tested, with the only gap being an unvalidated Both changes are well-scoped: No files require special attention. Important Files Changed
Reviews (5): Last reviewed commit: "Remove loop from listBranches, use page/..." | Re-trigger Greptile |
| $perPage = 100; | ||
| $currentPage = 1; | ||
| $names = []; |
There was a problem hiding this comment.
Lets do proper pagination support with params for this method
| $this->assertSame('7ae65094d56edafc48596ffbb77950e741e56412', $commitDetails['commitHash']); | ||
| } | ||
|
|
||
| public function testListBranchesFetchesAllPages(): void |
There was a problem hiding this comment.
Instead of mocking, lets just prepare repository with 2 or 3 branches, and make sure it works fine with small pages
There was a problem hiding this comment.
Lets make sure to make test consistant with others. Thiis is not pattern we have anywhere else in tests in this repo
| $this->assertSame('7ae65094d56edafc48596ffbb77950e741e56412', $commitDetails['commitHash']); | ||
| } | ||
|
|
||
| public function testListBranchesFetchesMultiplePages(): void |
| * @return array<string> List of branch names as array | ||
| */ | ||
| public function listBranches(string $owner, string $repositoryName): array | ||
| public function listBranches(string $owner, string $repositoryName, int $perPage = 100): array |
There was a problem hiding this comment.
Support page (consistency)
…ation test - Implement createBranch using GitHub refs API - Add page parameter to listBranches for consistency with other methods - Rewrite testListBranchesFetchesMultiplePages to use a real created repository with actual branches instead of a hardcoded external repo
No description provided.