diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2019-08-21 06:08:31 -0500 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-09-24 20:21:14 +0200 |
commit | d650e5eeb4098ff100fb9382ddb8ea51588b58f9 (patch) | |
tree | 8c0dc1b55dd81485c3baaf02da6f4a52a5ae2ebc /sonar-ws | |
parent | d170d4e4812844d37a7ec0355ba968bc9ef55545 (diff) | |
download | sonarqube-d650e5eeb4098ff100fb9382ddb8ea51588b58f9.tar.gz sonarqube-d650e5eeb4098ff100fb9382ddb8ea51588b58f9.zip |
Feature/dm/migrate new code period (#2017)
* SONAR-12396 List new code periods for all branches with effective current values
* SONAR-12347 Migrate old definitions of leak period
Diffstat (limited to 'sonar-ws')
4 files changed, 12 insertions, 211 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/DeleteNewCodePeriodRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/DeleteNewCodePeriodRequest.java deleted file mode 100644 index 9b81df3ebe7..00000000000 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/DeleteNewCodePeriodRequest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2019 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.settings; - -import java.util.List; -import javax.annotation.Generated; - -/** - * This is part of the internal API. - * This is a POST request. - * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/delete_new_code_period">Further information about this action online (including a response example)</a> - * @since 8.0 - */ -@Generated("sonar-ws-generator") -public class DeleteNewCodePeriodRequest { - - private String branch; - private String project; - - /** - */ - public DeleteNewCodePeriodRequest setBranch(String branch) { - this.branch = branch; - return this; - } - - public String getBranch() { - return branch; - } - - /** - */ - public DeleteNewCodePeriodRequest setProject(String project) { - this.project = project; - return this; - } - - public String getProject() { - return project; - } -} diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ShowNewCodePeriodRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ShowNewCodePeriodRequest.java deleted file mode 100644 index 72428c5c742..00000000000 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ShowNewCodePeriodRequest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2019 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.settings; - -import java.util.List; -import javax.annotation.Generated; - -/** - * This is part of the internal API. - * This is a POST request. - * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/show_new_code_period">Further information about this action online (including a response example)</a> - * @since 8.0 - */ -@Generated("sonar-ws-generator") -public class ShowNewCodePeriodRequest { - - private String branch; - private String project; - - /** - */ - public ShowNewCodePeriodRequest setBranch(String branch) { - this.branch = branch; - return this; - } - - public String getBranch() { - return branch; - } - - /** - */ - public ShowNewCodePeriodRequest setProject(String project) { - this.project = project; - return this; - } - - public String getProject() { - return project; - } -} diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/UpdateNewCodePeriodRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/UpdateNewCodePeriodRequest.java deleted file mode 100644 index 9091527e6e4..00000000000 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/UpdateNewCodePeriodRequest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2019 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.settings; - -import javax.annotation.Generated; - -/** - * This is part of the internal API. - * This is a POST request. - * - * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/update_new_code_period">Further information about this action online (including a response example)</a> - * @since 8.0 - */ -@Generated("sonar-ws-generator") -public class UpdateNewCodePeriodRequest { - - private String branch; - private String project; - private String type; - private String value; - - /** - * - */ - public UpdateNewCodePeriodRequest setBranch(String branch) { - this.branch = branch; - return this; - } - - public String getBranch() { - return branch; - } - - /** - * - */ - public UpdateNewCodePeriodRequest setProject(String project) { - this.project = project; - return this; - } - - public String getProject() { - return project; - } - - /** - * This is a mandatory parameter. - */ - public UpdateNewCodePeriodRequest setType(String type) { - this.type = type; - return this; - } - - public String getType() { - return type; - } - - /** - * - */ - public UpdateNewCodePeriodRequest setValue(String value) { - this.value = value; - return this; - } - - public String getValue() { - return value; - } -} diff --git a/sonar-ws/src/main/protobuf/ws-newcodeperiods.proto b/sonar-ws/src/main/protobuf/ws-newcodeperiods.proto index bfb3caf5fde..384e4d15399 100644 --- a/sonar-ws/src/main/protobuf/ws-newcodeperiods.proto +++ b/sonar-ws/src/main/protobuf/ws-newcodeperiods.proto @@ -16,27 +16,30 @@ // 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"; +syntax = "proto3"; package sonarqube.ws.batch; option java_package = "org.sonarqube.ws"; option java_outer_classname = "NewCodePeriods"; - option optimize_for = SPEED; // WS api/new_code_periods/show message ShowWSResponse { - optional string projectKey = 1; - optional string branchKey = 2; - required NewCodePeriodType type = 3; - optional string value = 4; - required bool inherited = 5; + string projectKey = 1; + string branchKey = 2; + NewCodePeriodType type = 3; + string value = 4; + bool inherited = 5; +} + +// WS api/new_code_periods/list +message ListWSResponse { + repeated ShowWSResponse newCodePeriods = 1; } enum NewCodePeriodType { PREVIOUS_VERSION = 0; NUMBER_OF_DAYS = 1; - DATE = 2; - SPECIFIC_ANALYSIS = 3; + SPECIFIC_ANALYSIS = 2; } |