feat(gitea): add Gitea/Forgejo as a git provider
Full parity with the existing GitLab provider: - Server module packages/web/server/lib/gitea (auth/client/repo/routes + docs + tests) with Gitea REST v1 API, PAT + base URL auth, multi-account storage - Shared GiteaAPI types and web API client - Provider detection generalized with user-configurable custom domains per provider (github/gitlab/gitea), additive with built-in defaults (github.com, gitlab.com) and connected-account hosts; precedence github -> gitlab -> gitea - Gitea PR view, issues section, pickers, integration dialog, branch PR status helper, settings UI (PAT + base URL + custom domains) - Magic prompts (gitea.pr.review, gitea.issue.review) and full 11-locale i18n parity
This commit is contained in:
@@ -60,6 +60,7 @@ import { BranchIntegrationSection, type OperationLogEntry } from './git/BranchIn
|
||||
import { deriveBaseBranch } from './git/baseBranch';
|
||||
import { getFreshestPrStatusForBranch, useGitHubPrStatusStore } from '@/stores/useGitHubPrStatusStore';
|
||||
import { useGitLabMrForBranch } from '@/lib/gitlabMrStatus';
|
||||
import { useGiteaPrForBranch } from '@/lib/giteaPrStatus';
|
||||
import { createGitIndexMutationQueue, type GitIndexMutationDirection, type GitIndexMutationQueue } from './git/gitIndexMutationQueue';
|
||||
import type { GitRemote } from '@/lib/gitApi';
|
||||
import { getRootBranch } from '@/lib/worktrees/worktreeStatus';
|
||||
@@ -306,6 +307,7 @@ export const GitView: React.FC<GitViewProps> = ({ isActive }) => {
|
||||
|
||||
const prStatusBranch = status?.current ?? null;
|
||||
const { mr: gitLabMr } = useGitLabMrForBranch(currentDirectory, prStatusBranch);
|
||||
const { pr: giteaPr } = useGiteaPrForBranch(currentDirectory, prStatusBranch);
|
||||
const prChipStatus = useGitHubPrStatusStore((state) => {
|
||||
if (!currentDirectory || !prStatusBranch) {
|
||||
return null;
|
||||
@@ -2367,6 +2369,10 @@ export const GitView: React.FC<GitViewProps> = ({ isActive }) => {
|
||||
onOpenGitLabMr={
|
||||
currentDirectory ? () => openContextSurface(currentDirectory, 'pr') : undefined
|
||||
}
|
||||
giteaPr={giteaPr}
|
||||
onOpenGiteaPr={
|
||||
currentDirectory ? () => openContextSurface(currentDirectory, 'pr') : undefined
|
||||
}
|
||||
/>
|
||||
|
||||
{/* In-progress operation banner */}
|
||||
|
||||
Reference in New Issue
Block a user