Skip to content

Fix repository listing for private GitHub profiles - #139

Closed
HarshMN2345 wants to merge 1 commit into
mainfrom
codex/fix-github-private-profile-repositories
Closed

HarshMN2345 wants to merge 1 commit into
mainfrom
codex/fix-github-private-profile-repositories

Conversation

@HarshMN2345

Copy link
Copy Markdown
Member

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 --check pass. Tests use a provider fake and make no external requests.

Fixes appwrite/appwrite#7352.
Fixes appwrite/appwrite#8347.

@github-actions

Copy link
Copy Markdown

Thanks for contributing! This repository is a read-only mirror; development for this library happens in packages/vcs in the utopia-php monorepo. Please open this pull request there instead.

@github-actions github-actions Bot closed this Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: No repositories when trying to create a function via Git 🐛 Bug Report: No repos visible after connecting GitHub

1 participant