]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-22596 Trigger synchronisation after confirming auto-provisioning
authorguillaume-peoch-sonarsource <guillaume.peoch@sonarsource.com>
Fri, 26 Jul 2024 15:29:06 +0000 (17:29 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 30 Jul 2024 20:02:34 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx

index 0e18dea9b7b6c6404052c4c03ba0cc9258d80584..f6c20eaa44b46a5470483e002476f715b1b60cd5 100644 (file)
@@ -59,7 +59,7 @@ export default function AutoProvisioningConsent(props: Readonly<Props>) {
     id: 'settings.authentication.confirm_auto_provisioning.header',
   });
 
-  const onClickAutoProvisioning = () => {
+  const onClickAutoProvisioning = async () => {
     if (githubConfiguration) {
       updateGithubConfig({
         id: githubConfiguration.id,
@@ -69,7 +69,13 @@ export default function AutoProvisioningConsent(props: Readonly<Props>) {
       });
     }
     if (gitlabConfiguration) {
-      resetSettingValue({ keys: [CONSENT_SETTING_KEY] });
+      await resetSettingValue({ keys: [CONSENT_SETTING_KEY] });
+      updateGitlabConfig({
+        id: gitlabConfiguration.id,
+        data: {
+          provisioningType: ProvisioningType.auto,
+        },
+      });
     }
   };