From 04127c98f06fd58ea47d32b03e77a9f8a47bbad3 Mon Sep 17 00:00:00 2001 From: Mathieu Suen Date: Tue, 9 May 2023 11:41:11 +0200 Subject: [PATCH] SONAR-19084 Improve GitHub authentication settings --- .../org/sonar/auth/github/GitHubSettings.java | 2 +- .../authentication/GithubAuthenticationTab.tsx | 10 +++++++--- .../__tests__/Authentication-it.tsx | 3 ++- .../hook/useGithubConfiguration.ts | 2 +- .../resources/org/sonar/l10n/core.properties | 17 +++++++++-------- 5 files changed, 20 insertions(+), 14 deletions(-) diff --git a/server/sonar-auth-github/src/main/java/org/sonar/auth/github/GitHubSettings.java b/server/sonar-auth-github/src/main/java/org/sonar/auth/github/GitHubSettings.java index 25b27bf7284..f3fb6f07304 100644 --- a/server/sonar-auth-github/src/main/java/org/sonar/auth/github/GitHubSettings.java +++ b/server/sonar-auth-github/src/main/java/org/sonar/auth/github/GitHubSettings.java @@ -165,7 +165,7 @@ public class GitHubSettings { .index(index++) .build(), PropertyDefinition.builder(APP_ID) - .name("GitHub App ID") + .name("App ID") .description("The App ID is found on your GitHub App's page on GitHub at Settings > Developer Settings > GitHub Apps.") .category(CATEGORY) .subCategory(SUBCATEGORY) diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx index 8a64c40ea81..88055fb19d1 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx @@ -36,7 +36,7 @@ import CheckIcon from '../../../../components/icons/CheckIcon'; import DeleteIcon from '../../../../components/icons/DeleteIcon'; import EditIcon from '../../../../components/icons/EditIcon'; import { Alert } from '../../../../components/ui/Alert'; -import { translate } from '../../../../helpers/l10n'; +import { translate, translateWithParameters } from '../../../../helpers/l10n'; import { AlmKeys } from '../../../../types/alm-settings'; import { ExtendedSettingDefinition } from '../../../../types/settings'; import { DOCUMENTATION_LINK_SUFFIXES } from './Authentication'; @@ -149,7 +149,7 @@ export default function GithubAuthenticationTab(props: GithubAuthenticationProps <>
-
{appId}
+
{translateWithParameters('settings.authentication.github.appid_x', appId)}

{url}

{enabled ? ( @@ -161,7 +161,11 @@ export default function GithubAuthenticationTab(props: GithubAuthenticationProps translate('settings.authentication.form.not_enabled') )}

-