@@ -34,6 +34,7 @@ import org.sonarqube.ws.client.duplications.DuplicationsService; | |||
import org.sonarqube.ws.client.editions.EditionsService; | |||
import org.sonarqube.ws.client.emails.EmailsService; | |||
import org.sonarqube.ws.client.favorites.FavoritesService; | |||
import org.sonarqube.ws.client.githubprovisioning.GithubProvisioningService; | |||
import org.sonarqube.ws.client.governancereports.GovernanceReportsService; | |||
import org.sonarqube.ws.client.hotspots.HotspotsService; | |||
import org.sonarqube.ws.client.issues.IssuesService; | |||
@@ -140,6 +141,7 @@ class DefaultWsClient implements WsClient { | |||
private final SecurityReportsService securityReportsService; | |||
private final RegulatoryReportsService regulatoryReportsService; | |||
private final SonarLintServerPushService sonarLintPushService; | |||
private final GithubProvisioningService githubProvisioningService; | |||
DefaultWsClient(WsConnector wsConnector) { | |||
this.wsConnector = wsConnector; | |||
@@ -198,6 +200,7 @@ class DefaultWsClient implements WsClient { | |||
this.securityReportsService = new SecurityReportsService(wsConnector); | |||
this.sonarLintPushService = new SonarLintServerPushService(wsConnector); | |||
this.regulatoryReportsService = new RegulatoryReportsService(wsConnector); | |||
this.githubProvisioningService = new GithubProvisioningService(wsConnector); | |||
} | |||
@Override | |||
@@ -416,6 +419,11 @@ class DefaultWsClient implements WsClient { | |||
return settingsService; | |||
} | |||
@Override | |||
public GithubProvisioningService githubProvisioning() { | |||
return githubProvisioningService; | |||
} | |||
@Override | |||
public SourcesService sources() { | |||
return sourcesService; |
@@ -34,6 +34,7 @@ import org.sonarqube.ws.client.duplications.DuplicationsService; | |||
import org.sonarqube.ws.client.editions.EditionsService; | |||
import org.sonarqube.ws.client.emails.EmailsService; | |||
import org.sonarqube.ws.client.favorites.FavoritesService; | |||
import org.sonarqube.ws.client.githubprovisioning.GithubProvisioningService; | |||
import org.sonarqube.ws.client.governancereports.GovernanceReportsService; | |||
import org.sonarqube.ws.client.hotspots.HotspotsService; | |||
import org.sonarqube.ws.client.issues.IssuesService; | |||
@@ -176,6 +177,8 @@ public interface WsClient { | |||
SettingsService settings(); | |||
GithubProvisioningService githubProvisioning(); | |||
SourcesService sources(); | |||
SupportService support(); |
@@ -0,0 +1,42 @@ | |||
/* | |||
* SonarQube | |||
* Copyright (C) 2009-2023 SonarSource SA | |||
* mailto:info AT sonarsource DOT com | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
* version 3 of the License, or (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
* Lesser General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU Lesser General Public License | |||
* along with this program; if not, write to the Free Software Foundation, | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
package org.sonarqube.ws.client.githubprovisioning; | |||
import org.sonarqube.ws.client.BaseService; | |||
import org.sonarqube.ws.client.PostRequest; | |||
import org.sonarqube.ws.client.WsConnector; | |||
public class GithubProvisioningService extends BaseService { | |||
public GithubProvisioningService(WsConnector wsConnector) { | |||
super(wsConnector, "api/github_provisioning"); | |||
} | |||
public void enable() { | |||
call( | |||
new PostRequest(path("enable")) | |||
); | |||
} | |||
public void disable() { | |||
call( | |||
new PostRequest(path("disable")) | |||
); | |||
} | |||
} |