feat(web,ui): per-provider git forge API base URL and detection URLs

Configure a default API base URL per git provider (github/gitlab/gitea)
in settings.json gitProviders, with GitHub Enterprise support (Octokit
baseUrl + device-flow web origin derived from the API base), and replace
the client-side custom-domains list with server-persisted detection URL
chips (SSH/HTTPS forms normalized to hosts). The configured API base host
auto-counts as a detection host. Settings round-trip through the existing
/api/config/settings sanitizer; the UI store hydrates from server settings
with a one-time localStorage migration.
This commit is contained in:
2026-08-17 09:55:11 +00:00
parent a87b3fd228
commit 0fc857959e
55 changed files with 1685 additions and 272 deletions
@@ -1635,9 +1635,12 @@ export const settingsDict = {
'settings.github.page.toast.ghCliEnabled': 'gh CLI Fallback aktiviert',
'settings.github.page.toast.ghCliDisabled': 'gh CLI Fallback deaktiviert',
'settings.github.page.toast.ghCliUpdateFailed': 'Fehler beim Aktualisieren der gh CLI Einstellung',
'settings.github.page.customDomains.label': 'Benutzerdefinierte Domains',
'settings.github.page.customDomains.description': 'Repositories auf diesen Domains werden als GitHub behandelt.',
'settings.github.page.customDomains.placeholder': 'github.example.com, git.mycompany.com',
'settings.github.page.apiBaseUrl.label': 'API-Basis-URL',
'settings.github.page.apiBaseUrl.placeholder': 'https://github.example.com/api/v3',
'settings.github.page.apiBaseUrl.description': 'Standard-Basis-URL für API-Aufrufe. Für GitHub Enterprise verwende die Adresse deines Servers, z. B. https://github.example.com/api/v3.',
'settings.github.page.detectUrls.label': 'Erkennungs-URLs',
'settings.github.page.detectUrls.placeholder': 'ssh://git@git.example.com:2222, https://git.example.com',
'settings.github.page.detectUrls.description': 'Repositories, die per SSH oder HTTPS von diesen Hosts geklont wurden, werden als GitHub erkannt.',
'settings.gitlab.page.title': 'GitLab Personal Access Token',
'settings.gitlab.page.description': 'Fügen Sie ein GitLab Personal Access Token ein, um eine Verbindung herzustellen. Legen Sie die Basis-URL fest, wenn Sie eine selbst gehostete GitLab-Instanz verwenden.',
'settings.gitlab.page.tooltip.connectAccount': 'Verbinden Sie ein GitLab-Konto für Issue- und Merge-Request-Workflows in der App.',
@@ -1645,9 +1648,12 @@ export const settingsDict = {
'settings.gitlab.page.accessToken.placeholder': 'Fügen Sie Ihr GitLab Personal Access Token ein',
'settings.gitlab.page.baseUrl.label': 'Basis-URL (optional)',
'settings.gitlab.page.baseUrl.placeholder': 'https://gitlab.com',
'settings.gitlab.page.customDomains.label': 'Benutzerdefinierte Domains',
'settings.gitlab.page.customDomains.description': 'Repositories auf diesen Domains werden als GitLab behandelt.',
'settings.gitlab.page.customDomains.placeholder': 'gitlab.example.com, git.company.com',
'settings.gitlab.page.apiBaseUrl.label': 'API-Basis-URL',
'settings.gitlab.page.apiBaseUrl.placeholder': 'https://gitlab.example.com',
'settings.gitlab.page.apiBaseUrl.description': 'Standard-Basis-URL für API-Aufrufe. Für selbst gehostete Instanzen verwende die Adresse deines Servers, z. B. https://gitlab.example.com.',
'settings.gitlab.page.detectUrls.label': 'Erkennungs-URLs',
'settings.gitlab.page.detectUrls.placeholder': 'ssh://git@git.example.com:2222, https://git.example.com',
'settings.gitlab.page.detectUrls.description': 'Repositories, die per SSH oder HTTPS von diesen Hosts geklont wurden, werden als GitLab erkannt.',
'settings.gitlab.page.actions.connect': 'GitLab verbinden',
'settings.gitlab.page.actions.disconnect': 'Trennen',
'settings.gitlab.page.actions.switch': 'Wechseln zu',
@@ -1687,9 +1693,15 @@ export const settingsDict = {
'settings.gitea.page.toast.disconnectFailed': 'Trennen von Gitea fehlgeschlagen',
'settings.gitea.page.toast.accountSwitched': 'Gitea-Konto gewechselt',
'settings.gitea.page.toast.accountSwitchFailed': 'Wechsel des Gitea-Kontos fehlgeschlagen',
'settings.gitea.page.customDomains.label': 'Benutzerdefinierte Domains',
'settings.gitea.page.customDomains.description': 'Repositories auf diesen Domains werden als Gitea oder Forgejo behandelt.',
'settings.gitea.page.customDomains.placeholder': 'gitea.example.com, git.company.com',
'settings.gitea.page.apiBaseUrl.label': 'API-Basis-URL',
'settings.gitea.page.apiBaseUrl.placeholder': 'https://gitea.example.com',
'settings.gitea.page.apiBaseUrl.description': 'Standard-Basis-URL für API-Aufrufe. Für selbst gehostete Instanzen verwende die Adresse deines Servers, z. B. https://gitea.example.com.',
'settings.gitea.page.detectUrls.label': 'Erkennungs-URLs',
'settings.gitea.page.detectUrls.placeholder': 'ssh://git@git.example.com:2222, https://git.example.com',
'settings.gitea.page.detectUrls.description': 'Repositories, die per SSH oder HTTPS von diesen Hosts geklont wurden, werden als Gitea oder Forgejo erkannt.',
'settings.gitProviders.detectUrls.add': 'Erkennungs-URL hinzufügen',
'settings.gitProviders.detectUrls.remove': '{host} entfernen',
'settings.gitProviders.detectUrls.invalid': 'Gib eine gültige SSH- oder HTTPS-URL bzw. einen gültigen Hostnamen ein.',
'settings.notifications.page.delivery.title': 'Benachrichtigungsübermittlung',
'settings.notifications.page.delivery.enableAria': 'Benachrichtigungen aktivieren',
'settings.notifications.page.delivery.enableLabel': 'Benachrichtigungen aktivieren',