Repository navigation
feat(console): add Gitea to Git connect - #15004
Conversation
Gitea is a Git provider on the server since 2.0, but the Console had no entry for it, so there was no way to connect it. Add it to the provider registry, and show only the connect options the server reports as configured in _APP_VCS_PROVIDERS, since authorizing any other fails.
|
Review complete. No blocking issues — approved ✅; 1 nitpick below. 🧹 Nitpicks (1) — 🟢 1 low
This PR introduces Gitea as a connectable VCS provider in the console. The provider list is now filtered at runtime against a server-reported capability variable so installs that have not configured a provider stop offering its connect flow, and the five call sites that previously showed all providers now fetch console variables and pass the capability list through. Registry metadata for Gitea (icon, oauth client, PR-link fallback) is added alongside the existing GitHub/GitLab/Bitbucket entries.
Reviewed commit: b5180bb |
New ConsoleProject ID: Tip GraphQL API works alongside REST and WebSocket protocols |
🔵 Tier A · Mergeable after minor fixes
This change adds Gitea to the Console’s Git provider metadata and filters Git connect options using the server’s configured-provider list. It also keeps Gitea pull-request links non-clickable and adds Hebrew and Japanese translations for the connect label.
Fix with agent prompt### Issue 1
apps/console/src/lib/vcs/providers.tsx:205
**Cover filtering against configured providers**
The updated unit test always passes `undefined`, so it only exercises the compatibility fallback and would still pass if a configured or empty `_APP_VCS_PROVIDERS` list were ignored. Please add cases confirming that an allowlist filters providers and an empty list hides all connect options.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.📂 Walkthrough · 12
Merged |
| return flag === null || features[flag] | ||
| return ( | ||
| (flag === null || features[flag]) && | ||
| vcsProviderHasCapability(provider.id, configuredProviders) |
There was a problem hiding this comment.
Cover filtering against configured providers
The updated unit test always passes undefined, so it only exercises the compatibility fallback and would still pass if a configured or empty _APP_VCS_PROVIDERS list were ignored. Please add cases confirming that an allowlist filters providers and an empty list hides all connect options.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/console/src/lib/vcs/providers.tsx
Line: 205
Comment:
**Cover filtering against configured providers**
The updated unit test always passes `undefined`, so it only exercises the compatibility fallback and would still pass if a configured or empty `_APP_VCS_PROVIDERS` list were ignored. Please add cases confirming that an allowlist filters providers and an empty list hides all connect options.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · testing · Reply if this doesn't apply.
feat(console): add Gitea to Git connect

What changed
_APP_VCS_PROVIDERSfrom/v1/console/variables, so only providers the server has configured are shown. Unconfigured ones previously showed a button whose authorize call failed with "provider is not configured".organizationUrl.Testing
bun test tests/unit/vcs-connect-providers.test.tspasses;bun run lint:types --against origin/mainreports no new errors._APP_VCS_PROVIDERS: ["gitea"]): Create site shows a single "Connect Gitea" button, and its link redirects to Gitea's/login/oauth/authorizewith the configured client ID and the/v1/vcs/gitea/callbackredirect URI._APP_VCS_PROVIDERS: []), the "Connect Git provider" box shows no connect buttons.