]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-20392 Avoid saving additional settings when switching GitHub provisioning mode
authorMathieu Suen <mathieu.suen@sonarsource.com>
Thu, 14 Sep 2023 14:11:08 +0000 (16:11 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 15 Sep 2023 20:03:05 +0000 (20:03 +0000)
server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useGithubConfiguration.ts

index db07040a07421930d7308003bd9b42164fec16e6..79df8b060d9f2d342a82cbdfb5f30868adb5ece4 100644 (file)
@@ -117,6 +117,7 @@ export default function useGithubConfiguration(definitions: ExtendedSettingDefin
 
   const setProvisioningType = (value: boolean | undefined) => {
     setRolesMapping(null);
+    GITHUB_ADDITIONAL_FIELDS.forEach((field) => setNewValue(field, undefined));
     setNewGithubProvisioningStatus(value);
   };