Fix/GitHub token error details#112
Conversation
|
closed with respect to this #113 |
Greptile Summary
Confidence Score: 4/5Not merge-safe until the GitHub branch listing return shape is reconciled with the shared adapter contract. The changed files are focused and tests cover the new pagination behavior, but the branch listing API now returns a metadata wrapper where callers expect plain branch names, which can break generic adapter code. src/VCS/Adapter/Git/GitHub.php
What T-Rex did
Reviews (1): Last reviewed commit: "fix: include status code and response bo..." | Re-trigger Greptile |
| * @return array{items: array<string>, total: int, nextCursor: string|null} | ||
| */ | ||
| public function listBranches(string $owner, string $repositoryName, int $perPage = 100, int $page = 1): array | ||
| public function listBranches(string $owner, string $repositoryName, int $perPage = 100, string|null $cursor = null, string $search = ''): array |
There was a problem hiding this comment.
listBranches() is part of the shared adapter API and is documented as returning an array of branch names. This GitHub implementation now returns a wrapper with items, total, and nextCursor, with the final shape assembled later around lines 807-811, while the other adapters still return plain branch-name arrays. Code written against Adapter can iterate this result or call in_array($branch, $adapter->listBranches(...), true) and fail only for GitHub because it receives metadata keys instead of branch names. Please keep listBranches() returning branch names and move the paginated/search shape to a separate method, or update the abstract contract and all adapters/callers together.
Artifacts
Repro: PHP script exercising GitHub::listBranches() with mocked GraphQL response
- Contains supporting evidence from the run (text/x-php; charset=utf-8).
Repro: failing output showing wrapper shape and broken in_array/foreach behavior
- Keeps the command output available without making the summary code-heavy.
No description provided.