aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Suen <mathieu.suen@sonarsource.com>2021-05-31 17:26:19 +0200
committersonartech <sonartech@sonarsource.com>2021-06-02 20:47:11 +0000
commitedb04b7bbdbb64dca951ac12d90a85481961d49a (patch)
tree5d5c555ce9306706ff39f721147ffcfbc7e8e05d
parent2c6664c45074f5a76d20160b41ddeb56f8122334 (diff)
downloadsonarqube-edb04b7bbdbb64dca951ac12d90a85481961d49a.tar.gz
sonarqube-edb04b7bbdbb64dca951ac12d90a85481961d49a.zip
SONAR-14801 Improve documentation for bitbucket onboarding
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/PersonalAccessTokenForm.tsx32
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/PersonalAccessTokenForm-test.tsx.snap50
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties5
3 files changed, 87 insertions, 0 deletions
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 469061ef70e..9d82f6be75f 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
@@ -257,6 +257,38 @@ export default class PersonalAccessTokenForm extends React.PureComponent<Props,
</form>
<Alert className="big-spacer-left width-50" display="block" variant="info">
+ {alm === AlmKeys.BitbucketCloud && (
+ <>
+ <h3>
+ {translate(
+ 'onboarding.create_project.pat_help.instructions_username.bitbucketcloud.title'
+ )}
+ </h3>
+ <p className="big-spacer-top big-spacer-bottom">
+ {translate(
+ 'onboarding.create_project.pat_help.instructions_username.bitbucketcloud'
+ )}
+ </p>
+
+ <div className="text-middle big-spacer-bottom">
+ <img
+ alt="" // Should be ignored by screen readers
+ className="spacer-right"
+ height="16"
+ src={`${getBaseUrl()}/images/alm/${AlmKeys.BitbucketServer}.svg`}
+ />
+ <a
+ href="https://bitbucket.org/account/settings/"
+ rel="noopener noreferrer"
+ target="_blank">
+ {translate(
+ 'onboarding.create_project.pat_help.instructions_username.bitbucketcloud.link'
+ )}
+ </a>
+ </div>
+ </>
+ )}
+
<h3>{translate(`onboarding.create_project.pat_help${suffixTranslationKey}.title`)}</h3>
<p className="big-spacer-top big-spacer-bottom">
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 a8ea7ab0c05..f262c79b050 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
@@ -206,6 +206,31 @@ exports[`should render correctly: bitbucket cloud 1`] = `
variant="info"
>
<h3>
+ onboarding.create_project.pat_help.instructions_username.bitbucketcloud.title
+ </h3>
+ <p
+ className="big-spacer-top big-spacer-bottom"
+ >
+ onboarding.create_project.pat_help.instructions_username.bitbucketcloud
+ </p>
+ <div
+ className="text-middle big-spacer-bottom"
+ >
+ <img
+ alt=""
+ className="spacer-right"
+ height="16"
+ src="/images/alm/bitbucket.svg"
+ />
+ <a
+ href="https://bitbucket.org/account/settings/"
+ rel="noopener noreferrer"
+ target="_blank"
+ >
+ onboarding.create_project.pat_help.instructions_username.bitbucketcloud.link
+ </a>
+ </div>
+ <h3>
onboarding.create_project.pat_help.bitbucketcloud.title
</h3>
<p
@@ -567,6 +592,31 @@ exports[`should show error when issue: issue submitting token 1`] = `
variant="info"
>
<h3>
+ onboarding.create_project.pat_help.instructions_username.bitbucketcloud.title
+ </h3>
+ <p
+ className="big-spacer-top big-spacer-bottom"
+ >
+ onboarding.create_project.pat_help.instructions_username.bitbucketcloud
+ </p>
+ <div
+ className="text-middle big-spacer-bottom"
+ >
+ <img
+ alt=""
+ className="spacer-right"
+ height="16"
+ src="/images/alm/bitbucket.svg"
+ />
+ <a
+ href="https://bitbucket.org/account/settings/"
+ rel="noopener noreferrer"
+ target="_blank"
+ >
+ onboarding.create_project.pat_help.instructions_username.bitbucketcloud.link
+ </a>
+ </div>
+ <h3>
onboarding.create_project.pat_help.bitbucketcloud.title
</h3>
<p
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
index 3ec15b957c7..232eb63cec8 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -3283,6 +3283,11 @@ onboarding.create_project.pat_help.bitbucketcloud.instructions=Click the followi
onboarding.create_project.pat_help.instructions2.bitbucket=Set a name, for example "SonarQube", and select the following permissions:
onboarding.create_project.pat_help.instructions2.bitbucketcloud=Set a name, for example "SonarQube", and select the following permissions:
+
+onboarding.create_project.pat_help.instructions_username.bitbucketcloud.title=How to find your username?
+onboarding.create_project.pat_help.instructions_username.bitbucketcloud=Click the following link to find your username in the Bitbucket profile settings
+onboarding.create_project.pat_help.instructions_username.bitbucketcloud.link=Personal settings
+
onboarding.create_project.pat_help.link=Create personal access token
onboarding.create_project.pat_help.bitbucketcloud.link=Add app password
onboarding.create_project.pat_help.bbs_permission_projects=Projects: {perm}