Fix repository listing for private GitHub profiles - #139
Closed
HarshMN2345 wants to merge 1 commit into
Closed
HarshMN2345 wants to merge 1 commit into
HarshMN2345 wants to merge 1 commit into
Conversation
|
Thanks for contributing! This repository is a read-only mirror; development for this library happens in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub returns HTTP 422 for repository searches scoped to an owner whose profile is private, even when the GitHub App installation can list that owner's repositories.
searchRepositories()currently turns this into an empty result.On search 422, verify that the requested owner matches the installation owner, then use the existing installation-repository listing and filtering path. Unknown owners still return no results, while authorization, rate-limit, and server errors retain their existing exceptions. Successful searches continue using GitHub search. The fallback uses the same local name filtering and pagination as restricted installations.
Validation: eight focused unit tests pass (16 assertions), including private profiles, case-insensitive owner matching, filtering across pages, unknown owners, normal search responses, and provider failures. Three cases fail against the original implementation. The complete unit suite passes: 96 tests, 393 assertions, one existing skip. Targeted PHPStan level 4, PHP syntax, formatting of added tests, and
git diff --checkpass. Tests use a provider fake and make no external requests.Fixes appwrite/appwrite#7352.
Fixes appwrite/appwrite#8347.