feat: add direct repository and branch lookup - #5080
Open
bestmaa wants to merge 2 commits into
Open
Conversation
bestmaa
marked this pull request as ready for review
August 14, 2026 09:06
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.
What is this PR about?
In organizations with a large number of repositories and branches, selecting a known repository or branch currently requires loading and paginating the complete list first. This can make provider setup slow and generate unnecessary API traffic.
This PR adds an optional direct lookup path while preserving the existing pickers:
owner/repository, a nested GitLab namespace, or a repository URL to fetch exactly one repository;/, to fetch exactly one branch;The change is intentionally contained in shared lookup components plus small provider-specific server adapters. It does not add a database migration or change existing saved provider configuration.
Why?
This was motivated by a real company setup where provider accounts contained many repositories and individual repositories contained many branches. Users usually already knew the exact repository and branch they wanted, but still had to wait for complete lists to load. Exact lookup makes that common path proportional to one API request instead of the size of the account or repository.
Testing
pnpm exec biome checkon all changed TypeScript/TSX filespnpm --filter=server run typecheckpnpm --filter=dokploy run typecheckacme/paymentsand branchmain/api/v1/repos/acme/paymentsand/api/v1/repos/acme/payments/branches/mainwere called; no full-list endpoint was usedChecklist
canaryScreenshots
Greptile Summary
This PR adds direct repository and branch lookup across GitHub, GitLab, Bitbucket, and Gitea while retaining the existing list-based pickers.
Confidence Score: 5/5
The PR appears safe to merge.
The previously reported stale-response failure is addressed by invalidating requests when lookup context changes, when a newer request begins, and when the component unmounts; no blocking failure remains.
Reviews (2): Last reviewed commit: "fix: ignore stale git lookup responses" | Re-trigger Greptile
Context used: