diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2021-01-26 09:30:35 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-02-08 20:07:44 +0000 |
commit | eaa3c931777204492328dc49c93e2cfca3d9c307 (patch) | |
tree | f07933edc99213209b7c84fac80e938ada68f955 /server/sonar-web/src/main/js/helpers | |
parent | 3bb16bc1523169ff3eba97c9ccc98efc90b6c068 (diff) | |
download | sonarqube-eaa3c931777204492328dc49c93e2cfca3d9c307.tar.gz sonarqube-eaa3c931777204492328dc49c93e2cfca3d9c307.zip |
SONAR-14393 Add admin form for Bitbucket Cloud integration
Diffstat (limited to 'server/sonar-web/src/main/js/helpers')
-rw-r--r-- | server/sonar-web/src/main/js/helpers/constants.ts | 10 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/helpers/mocks/alm-settings.ts | 15 |
2 files changed, 23 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/helpers/constants.ts b/server/sonar-web/src/main/js/helpers/constants.ts index e7bfcfa1e25..5cfc1f6a4ad 100644 --- a/server/sonar-web/src/main/js/helpers/constants.ts +++ b/server/sonar-web/src/main/js/helpers/constants.ts @@ -65,7 +65,15 @@ export const PROJECT_KEY_MAX_LEN = 400; export const ALM_DOCUMENTATION_PATHS = { [AlmKeys.Azure]: '/documentation/analysis/azuredevops-integration/', - [AlmKeys.Bitbucket]: '/documentation/analysis/bitbucket-integration/', + [AlmKeys.BitbucketServer]: '/documentation/analysis/bitbucket-integration/', + [AlmKeys.BitbucketCloud]: '/documentation/analysis/bitbucket-cloud-integration/', [AlmKeys.GitHub]: '/documentation/analysis/github-integration/', [AlmKeys.GitLab]: '/documentation/analysis/gitlab-integration/' }; + +export const IMPORT_COMPATIBLE_ALMS = [ + AlmKeys.Azure, + AlmKeys.BitbucketServer, + AlmKeys.GitHub, + AlmKeys.GitLab +]; diff --git a/server/sonar-web/src/main/js/helpers/mocks/alm-settings.ts b/server/sonar-web/src/main/js/helpers/mocks/alm-settings.ts index 5e48a2c263c..cff3a5b4ff4 100644 --- a/server/sonar-web/src/main/js/helpers/mocks/alm-settings.ts +++ b/server/sonar-web/src/main/js/helpers/mocks/alm-settings.ts @@ -24,6 +24,7 @@ import { AlmSettingsInstance, AzureBindingDefinition, BitbucketBindingDefinition, + BitbucketCloudBindingDefinition, GithubBindingDefinition, GitlabBindingDefinition, ProjectAlmBindingResponse, @@ -64,6 +65,18 @@ export function mockBitbucketBindingDefinition( }; } +export function mockBitbucketCloudBindingDefinition( + overrides: Partial<BitbucketCloudBindingDefinition> = {} +): BitbucketCloudBindingDefinition { + return { + key: 'key', + clientId: 'client1', + clientSecret: '**clientsecret**', + workspace: 'workspace', + ...overrides + }; +} + export function mockGithubBindingDefinition( overrides: Partial<GithubBindingDefinition> = {} ): GithubBindingDefinition { @@ -102,7 +115,7 @@ export function mockProjectBitbucketBindingResponse( overrides: Partial<ProjectBitbucketBindingResponse> = {} ): ProjectBitbucketBindingResponse { return { - alm: AlmKeys.Bitbucket, + alm: AlmKeys.BitbucketServer, key: 'foo', repository: 'PROJECT_KEY', slug: 'repo-slug', |