Skip to content

feat: Branch and file selector#102

Merged
alex289 merged 12 commits into
mainfrom
feature/branch_file_selector
Apr 21, 2026
Merged

feat: Branch and file selector#102
alex289 merged 12 commits into
mainfrom
feature/branch_file_selector

Conversation

@alex289

@alex289 alex289 commented Apr 20, 2026

Copy link
Copy Markdown
Member

Type of change

  • 🐛 Bug fix
  • 🚀 New feature
  • ❓ Other (please specify)

Description

  • Add endpoints for getting repository branches and trees
  • Show branch and file selector

Additional context

  • Disable goconst because it's too strict

@alex289 alex289 requested a review from timokoessler April 20, 2026 12:13
@alex289 alex289 self-assigned this Apr 20, 2026
@alex289 alex289 added the enhancement New feature or request label Apr 20, 2026
@codecov

codecov Bot commented Apr 20, 2026

Copy link
Copy Markdown

Comment thread backend/internal/hub/repositories/gitea.go Outdated
Comment thread backend/internal/hub/repositories/gitea.go Outdated
Comment thread backend/.golangci.yml
Comment thread backend/internal/hub/repositories/gitlab.go Outdated
Comment thread backend/internal/hub/repositories/github.go Outdated
Comment thread frontend/src/components/dialogs/upsert-application.tsx
Comment thread frontend/src/components/dialogs/upsert-application.tsx
Comment thread frontend/src/components/dialogs/upsert-application.tsx
Copilot AI review requested due to automatic review settings April 21, 2026 07:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/branches and /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 goconst from 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.

Comment thread backend/internal/hub/repositories/gitea.go
Comment thread backend/internal/hub/repositories/gitlab.go
Comment thread frontend/src/components/ui/collapsible.tsx
Comment thread frontend/src/components/dialogs/upsert-application.tsx Outdated
Comment thread frontend/src/components/dialogs/upsert-application.tsx
Comment thread frontend/src/components/dialogs/upsert-application.tsx
Comment thread frontend/src/components/dialogs/upsert-application.tsx Outdated
Comment thread backend/internal/hub/repositories/github.go
alex289 and others added 4 commits April 21, 2026 09:36
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>
@alex289 alex289 requested a review from timokoessler April 21, 2026 07:49
Comment thread backend/internal/hub/routes/applications.go
@alex289 alex289 requested a review from timokoessler April 21, 2026 08:15
@alex289 alex289 enabled auto-merge (squash) April 21, 2026 08:16
@alex289 alex289 merged commit ae41045 into main Apr 21, 2026
7 checks passed
@alex289 alex289 deleted the feature/branch_file_selector branch April 21, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants