From 1448afc7fb48428b86595fe9d321a5c300634d62 Mon Sep 17 00:00:00 2001 From: Alex Tugarev Date: Mon, 11 Apr 2022 08:46:42 +0000 Subject: [PATCH] [bitbucket-server] add to Git Integrations UI --- .../dashboard/src/settings/Integrations.tsx | 21 +++++++++++++++++-- .../server/src/auth/auth-provider-service.ts | 14 ++++++++++++- components/server/src/auth/authenticator.ts | 5 ++++- .../bitbucket-server-auth-provider.ts | 12 +---------- .../bitbucket-server-oauth-scopes.ts | 6 +++--- .../bitbucket-server/bitbucket-server-urls.ts | 15 +++++++++++++ 6 files changed, 55 insertions(+), 18 deletions(-) create mode 100644 components/server/src/bitbucket-server/bitbucket-server-urls.ts diff --git a/components/dashboard/src/settings/Integrations.tsx b/components/dashboard/src/settings/Integrations.tsx index 5611d5a4b129ea..00127dc3f1967b 100644 --- a/components/dashboard/src/settings/Integrations.tsx +++ b/components/dashboard/src/settings/Integrations.tsx @@ -11,6 +11,7 @@ import AlertBox from "../components/AlertBox"; import CheckBox from "../components/CheckBox"; import ConfirmationModal from "../components/ConfirmationModal"; import { ContextMenuEntry } from "../components/ContextMenu"; +import InfoBox from "../components/InfoBox"; import { Item, ItemField, ItemFieldContextMenu, ItemFieldIcon, ItemsList } from "../components/ItemsList"; import Modal from "../components/Modal"; import { PageWithSubMenu } from "../components/PageWithSubMenu"; @@ -443,7 +444,7 @@ function GitIntegrations() {

Git Integrations

-

Manage Git integrations for GitLab or GitHub self-hosted instances.

+

Manage Git integrations for self-managed instances of GitLab, GitHub, or Bitbucket.

{providers.length !== 0 ? (
@@ -710,6 +711,8 @@ export function GitIntegrationModal( return "github.example.com"; case "GitLab": return "gitlab.example.com"; + case "BitbucketServer": + return "bitbucket.example.com"; default: return ""; } @@ -737,7 +740,7 @@ export function GitIntegrationModal(
{props.headerText || - "Configure a Git integration with a GitLab or GitHub self-hosted instance."} + "Configure an integration with a self-managed instance of GitLab, GitHub, or Bitbucket."}
@@ -756,9 +759,23 @@ export function GitIntegrationModal( > +
)} + {mode === "new" && type === "BitbucketServer" && ( + + Support for OAuth2 in Bitbucket Server was{" "} + + added in version 7.20 + + + )}