feat: Branch and file selector#102
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds repository branch/tree APIs and wires them into the “Upsert Application” dialog to provide an in-app branch selector and compose-file picker.
Changes:
- Backend: introduce
/repositories/:id/branchesand/repositories/:id/tree?branch=...endpoints and extend repository providers to list branches and tree entries. - Frontend: update SWR fetch hook to support conditional fetching and add branch + file-tree selection UI in the application dialog.
- Tooling: remove
goconstfrom backend golangci-lint config.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/lib/api.ts | Allow useFetch to accept null keys for conditional SWR requests. |
| frontend/src/components/ui/collapsible.tsx | New collapsible UI wrapper used by the file tree. |
| frontend/src/components/dialogs/upsert-application.tsx | Adds branch selector + repository tree browser for selecting a compose file path. |
| backend/internal/hub/routes/repositories_test.go | Adds route-level tests for new branches/tree endpoints; enhances HTTP mock helper. |
| backend/internal/hub/routes/repositories.go | Adds route handlers for listing branches and repository tree; adds shared repo/provider resolver. |
| backend/internal/hub/repositories/provider_test.go | Extends stub provider and adds unit test for branch sorting behavior. |
| backend/internal/hub/repositories/provider.go | Extends Provider interface with ListBranches/ListTree; adds TreeEntry types and branch sorting helper. |
| backend/internal/hub/repositories/gitlab_test.go | Adds/extends GitLab provider tests for auth methods, pagination, and new APIs. |
| backend/internal/hub/repositories/gitlab.go | Implements GitLab ListBranches/ListTree and refactors URL parsing/auth header handling. |
| backend/internal/hub/repositories/github_test.go | Adds/extends GitHub provider tests for auth methods and new APIs. |
| backend/internal/hub/repositories/github.go | Implements GitHub ListBranches/ListTree and consolidates header logic. |
| backend/internal/hub/repositories/gitea_test.go | Adds/extends Gitea provider tests for auth methods and new APIs. |
| backend/internal/hub/repositories/gitea.go | Implements Gitea ListBranches/ListTree and refactors URL parsing/header handling. |
| backend/internal/hub/handlers.go | Registers new repository branches/tree routes. |
| backend/.golangci.yml | Disables goconst linter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
timokoessler
approved these changes
Apr 21, 2026
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.
Type of change
Description
Additional context