From fbc15d54619678623e9ebf984553ac583fba549a Mon Sep 17 00:00:00 2001 From: Antoine Vigneau Date: Mon, 2 Oct 2023 15:14:14 +0200 Subject: [PATCH] SONAR-20635 Make all project import endpoints public --- .../almintegration/ws/azure/ImportAzureProjectAction.java | 6 ++++-- .../ws/bitbucketcloud/ImportBitbucketCloudRepoAction.java | 6 ++++-- .../bitbucketserver/ImportBitbucketServerProjectAction.java | 6 ++++-- .../almintegration/ws/github/ImportGithubProjectAction.java | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/azure/ImportAzureProjectAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/azure/ImportAzureProjectAction.java index 4f7b971c215..ea1f98ef13d 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/azure/ImportAzureProjectAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/azure/ImportAzureProjectAction.java @@ -23,6 +23,7 @@ import java.util.Optional; import javax.inject.Inject; import org.sonar.alm.client.azure.AzureDevOpsHttpClient; import org.sonar.alm.client.azure.GsonAzureRepo; +import org.sonar.api.server.ws.Change; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; @@ -94,9 +95,10 @@ public class ImportAzureProjectAction implements AlmIntegrationsWsAction { "Autoconfigure pull request decoration mechanism.
" + "Requires the 'Create Projects' permission") .setPost(true) - .setInternal(true) .setSince("8.6") - .setHandler(this); + .setHandler(this) + .setChangelog( + new Change("10.3", "Endpoint visibility change from internal to public")); action.createParam(PARAM_ALM_SETTING) .setRequired(true) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketcloud/ImportBitbucketCloudRepoAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketcloud/ImportBitbucketCloudRepoAction.java index f0a4ea25979..656f4dd07e5 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketcloud/ImportBitbucketCloudRepoAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketcloud/ImportBitbucketCloudRepoAction.java @@ -24,6 +24,7 @@ import javax.annotation.Nullable; import javax.inject.Inject; import org.sonar.alm.client.bitbucket.bitbucketcloud.BitbucketCloudRestClient; import org.sonar.alm.client.bitbucket.bitbucketcloud.Repository; +import org.sonar.api.server.ws.Change; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; @@ -95,9 +96,10 @@ public class ImportBitbucketCloudRepoAction implements AlmIntegrationsWsAction { "Autoconfigure pull request decoration mechanism.
" + "Requires the 'Create Projects' permission") .setPost(true) - .setInternal(true) .setSince("9.0") - .setHandler(this); + .setHandler(this) + .setChangelog( + new Change("10.3", "Endpoint visibility change from internal to public")); action.createParam(PARAM_REPO_SLUG) .setRequired(true) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketserver/ImportBitbucketServerProjectAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketserver/ImportBitbucketServerProjectAction.java index 23d6c592aa1..e6001d8697b 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketserver/ImportBitbucketServerProjectAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/bitbucketserver/ImportBitbucketServerProjectAction.java @@ -26,6 +26,7 @@ import org.sonar.alm.client.bitbucketserver.BitbucketServerRestClient; import org.sonar.alm.client.bitbucketserver.Branch; import org.sonar.alm.client.bitbucketserver.BranchesList; import org.sonar.alm.client.bitbucketserver.Repository; +import org.sonar.api.server.ws.Change; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; @@ -100,9 +101,10 @@ public class ImportBitbucketServerProjectAction implements AlmIntegrationsWsActi "Autoconfigure pull request decoration mechanism.
" + "Requires the 'Create Projects' permission") .setPost(true) - .setInternal(true) .setSince("8.2") - .setHandler(this); + .setHandler(this) + .setChangelog( + new Change("10.3", "Endpoint visibility change from internal to public")); action.createParam(PARAM_ALM_SETTING) .setRequired(true) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/github/ImportGithubProjectAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/github/ImportGithubProjectAction.java index 41e77913588..3a6db7a1345 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/github/ImportGithubProjectAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/almintegration/ws/github/ImportGithubProjectAction.java @@ -27,6 +27,7 @@ import org.sonar.alm.client.github.GithubApplicationClient.Repository; import org.sonar.alm.client.github.GithubApplicationClientImpl; import org.sonar.alm.client.github.security.AccessToken; import org.sonar.alm.client.github.security.UserAccessToken; +import org.sonar.api.server.ws.Change; import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; @@ -110,9 +111,10 @@ public class ImportGithubProjectAction implements AlmIntegrationsWsAction { "Autoconfigure pull request decoration mechanism.
" + "Requires the 'Create Projects' permission") .setPost(true) - .setInternal(true) .setSince("8.4") - .setHandler(this); + .setHandler(this) + .setChangelog( + new Change("10.3", "Endpoint visibility change from internal to public")); action.createParam(PARAM_ALM_SETTING) .setRequired(true) -- 2.39.5