From fa66b52121ad0ec2df2c8e2861d88f7d644bb2bf Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Mon, 21 Jun 2021 17:59:20 +0200 Subject: [PATCH] SONAR-14851 Github QG status reporting - Add a note about App permissions --- .../AlmBindingDefinitionBox.tsx | 28 +++++++++++-- .../AlmBindingDefinitionBox-test.tsx.snap | 40 +++++++++++++++++++ .../resources/org/sonar/l10n/core.properties | 1 + 3 files changed, 65 insertions(+), 4 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx index 5216f946dd9..031d7ccee56 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx @@ -19,6 +19,7 @@ */ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; +import { Link } from 'react-router'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import HelpTooltip from 'sonar-ui-common/components/controls/HelpTooltip'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; @@ -28,7 +29,7 @@ import DeleteIcon from 'sonar-ui-common/components/icons/DeleteIcon'; import EditIcon from 'sonar-ui-common/components/icons/EditIcon'; import { Alert } from 'sonar-ui-common/components/ui/Alert'; import { translate } from 'sonar-ui-common/helpers/l10n'; -import { IMPORT_COMPATIBLE_ALMS } from '../../../../helpers/constants'; +import { ALM_DOCUMENTATION_PATHS, IMPORT_COMPATIBLE_ALMS } from '../../../../helpers/constants'; import { getEdition, getEditionUrl } from '../../../../helpers/editions'; import { AlmBindingDefinition, @@ -216,9 +217,28 @@ export default function AlmBindingDefinitionBox(props: AlmBindingDefinitionBoxPr )} {status.type === AlmSettingsBindingStatusType.Success && status.alertSuccess && ( - - {translate('settings.almintegration.configuration_valid')} - + <> + + {translate('settings.almintegration.configuration_valid')} + + {alm === AlmKeys.GitHub && ( + + + {translate('learn_more')} + + ) + }} + /> + + )} + )} diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionBox-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionBox-test.tsx.snap index 5f832081abf..1937189579d 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionBox-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionBox-test.tsx.snap @@ -514,6 +514,26 @@ exports[`should render correctly: success with alert 1`] = ` > settings.almintegration.configuration_valid + + + learn_more + , + } + } + /> +