From 7f6e9853e2d733759d2d21f7a25a9c59d263f68d Mon Sep 17 00:00:00 2001 From: Pierre Guillot Date: Tue, 4 Feb 2020 15:05:34 +0100 Subject: SONAR-13001 create endpoint alm_integrations/list_bitbucketserver_repos --- .../almintegration/AlmIntegrationService.java | 3 +- .../src/main/protobuf/ws-alm_integrations.proto | 40 ++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 sonar-ws/src/main/protobuf/ws-alm_integrations.proto (limited to 'sonar-ws/src') diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almintegration/AlmIntegrationService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almintegration/AlmIntegrationService.java index 3eb984c20ad..e68e67138ac 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/almintegration/AlmIntegrationService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almintegration/AlmIntegrationService.java @@ -22,6 +22,7 @@ package org.sonarqube.ws.client.almintegration; import javax.annotation.Generated; import org.sonarqube.ws.MediaTypes; import org.sonarqube.ws.client.BaseService; +import org.sonarqube.ws.client.GetRequest; import org.sonarqube.ws.client.PostRequest; import org.sonarqube.ws.client.WsConnector; @@ -55,7 +56,7 @@ public class AlmIntegrationService extends BaseService { */ public void checkPat(CheckPatRequest request) { call( - new PostRequest(path("check_pat")) + new GetRequest(path("check_pat")) .setParam("almSetting", request.getAlmSetting()) .setMediaType(MediaTypes.JSON)).content(); } diff --git a/sonar-ws/src/main/protobuf/ws-alm_integrations.proto b/sonar-ws/src/main/protobuf/ws-alm_integrations.proto new file mode 100644 index 00000000000..e033289968a --- /dev/null +++ b/sonar-ws/src/main/protobuf/ws-alm_integrations.proto @@ -0,0 +1,40 @@ +// SonarQube, open source software quality management tool. +// Copyright (C) 2008-2016 SonarSource +// mailto:contact AT sonarsource DOT com +// +// SonarQube 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. +// +// SonarQube 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. + +syntax = "proto2"; + +package sonarqube.ws.almsetting; + +option java_package = "org.sonarqube.ws"; +option java_outer_classname = "AlmIntegrations"; +option optimize_for = SPEED; + +// WS api/alm_integrations/list_bibucketserver_repos +message ListBitbucketserverReposWsResponse { + optional bool isLastPage = 1; + repeated BBSRepo repositories = 2; +} + +message BBSRepo { + optional string slug = 1; + optional int64 id = 2; + optional string name = 3; + optional string url = 4; + optional string sqProjectKey = 5; + optional string projectKey = 6; +} -- cgit v1.2.3