From: Philippe Perrin Date: Tue, 17 Aug 2021 15:49:30 +0000 (+0200) Subject: SONAR-15303 Improve DevOps Platform configuration screen wording to reduce confusion... X-Git-Tag: 9.1.0.47736~105 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1e59824022415abdab28113b8c9407338a376f5a;p=sonarqube.git SONAR-15303 Improve DevOps Platform configuration screen wording to reduce confusion around personal access token --- diff --git a/server/sonar-web/src/main/js/apps/create/project/PersonalAccessTokenForm.tsx b/server/sonar-web/src/main/js/apps/create/project/PersonalAccessTokenForm.tsx index 114698ed515..a571ab12006 100644 --- a/server/sonar-web/src/main/js/apps/create/project/PersonalAccessTokenForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/PersonalAccessTokenForm.tsx @@ -53,12 +53,11 @@ function getPatUrl(alm: AlmKeys, url = '') { return `${url.replace(/\/$/, '')}/plugins/servlet/access-tokens/add`; } else if (alm === AlmKeys.BitbucketCloud) { return 'https://bitbucket.org/account/settings/app-passwords/new'; - } else { - // GitLab - return url.endsWith('/api/v4') - ? `${url.replace('/api/v4', '').replace(/\/$/, '')}/profile/personal_access_tokens` - : 'https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#creating-a-personal-access-token'; + } else if (alm === AlmKeys.GitLab) { + return 'https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html'; } + + return ''; } export default class PersonalAccessTokenForm extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/PersonalAccessTokenForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/PersonalAccessTokenForm-test.tsx.snap index f262c79b050..65a05306be2 100644 --- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/PersonalAccessTokenForm-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/PersonalAccessTokenForm-test.tsx.snap @@ -372,7 +372,7 @@ exports[`should render correctly: gitlab 1`] = ` src="/images/alm/gitlab.svg" /> @@ -482,7 +482,7 @@ exports[`should render correctly: gitlab with non-standard api path 1`] = ` src="/images/alm/gitlab.svg" /> diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx index edee930408a..f07477bc8df 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx @@ -19,10 +19,10 @@ */ import * as React from 'react'; import { ButtonLink } from '../../../../components/controls/buttons'; -import HelpTooltip from '../../../../components/controls/HelpTooltip'; import MandatoryFieldMarker from '../../../../components/ui/MandatoryFieldMarker'; import { translate } from '../../../../helpers/l10n'; import { AlmBindingDefinitionBase } from '../../../../types/alm-settings'; +import '../../styles.css'; export interface AlmBindingDefinitionFormFieldProps { autoFocus?: boolean; @@ -54,51 +54,54 @@ export function AlmBindingDefinitionFormField -