@@ -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 && ( | |||
<Alert variant="success"> | |||
{translate('settings.almintegration.configuration_valid')} | |||
</Alert> | |||
<> | |||
<Alert variant="success"> | |||
{translate('settings.almintegration.configuration_valid')} | |||
</Alert> | |||
{alm === AlmKeys.GitHub && ( | |||
<Alert variant="warning"> | |||
<FormattedMessage | |||
id="settings.almintegration.github.additional_permission" | |||
defaultMessage={translate( | |||
'settings.almintegration.github.additional_permission' | |||
)} | |||
values={{ | |||
link: ( | |||
<Link target="_blank" to={ALM_DOCUMENTATION_PATHS[AlmKeys.GitHub]}> | |||
{translate('learn_more')} | |||
</Link> | |||
) | |||
}} | |||
/> | |||
</Alert> | |||
)} | |||
</> | |||
)} | |||
</div> | |||
@@ -514,6 +514,26 @@ exports[`should render correctly: success with alert 1`] = ` | |||
> | |||
settings.almintegration.configuration_valid | |||
</Alert> | |||
<Alert | |||
variant="warning" | |||
> | |||
<FormattedMessage | |||
defaultMessage="settings.almintegration.github.additional_permission" | |||
id="settings.almintegration.github.additional_permission" | |||
values={ | |||
Object { | |||
"link": <Link | |||
onlyActiveOnIndex={false} | |||
style={Object {}} | |||
target="_blank" | |||
to="/documentation/analysis/github-integration/" | |||
> | |||
learn_more | |||
</Link>, | |||
} | |||
} | |||
/> | |||
</Alert> | |||
</div> | |||
<Button | |||
className="big-spacer-top" | |||
@@ -623,6 +643,26 @@ exports[`should render correctly: success with branches disabled 1`] = ` | |||
> | |||
settings.almintegration.configuration_valid | |||
</Alert> | |||
<Alert | |||
variant="warning" | |||
> | |||
<FormattedMessage | |||
defaultMessage="settings.almintegration.github.additional_permission" | |||
id="settings.almintegration.github.additional_permission" | |||
values={ | |||
Object { | |||
"link": <Link | |||
onlyActiveOnIndex={false} | |||
style={Object {}} | |||
target="_blank" | |||
to="/documentation/analysis/github-integration/" | |||
> | |||
learn_more | |||
</Link>, | |||
} | |||
} | |||
/> | |||
</Alert> | |||
</div> | |||
<Button | |||
className="big-spacer-top" |
@@ -1095,6 +1095,7 @@ settings.almintegration.title=Integration configurations | |||
settings.almintegration.description=ALM integrations allow SonarQube to interact with your ALM. This enables things like authentication, or providing analysis details and a Quality Gate to your Pull Requests directly in your ALM provider's interface. | |||
settings.almintegration.azure.info=Accounts that will be used to decorate Pull Requests need Code: Read & Write permission. {link} | |||
settings.almintegration.github.info=You need to install a GitHub App with specific settings and permissions to enable Pull Request Decoration on your Organization or Repository. {link} | |||
settings.almintegration.github.additional_permission=If Quality Gate status reporting fails on private projects, you might need to add an additional permission to the GitHub App. {link} | |||
settings.almintegration.gitlab.info=Accounts that will be used to decorate Merge Requests need comment permissions on projects. The personal key needs the API scope permission. {link} | |||
settings.almintegration.bitbucket.help_1=SonarQube needs a Personal Access Token to communicate with Bitbucket Server. This token will be used to decorate Pull Requests. | |||
settings.almintegration.bitbucket.help_2=The account used for integration needs write permission. |