From 965271a98d0a9ce7062baa9de53bdd042e0a7c35 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Mon, 9 Dec 2019 10:04:05 +0100 Subject: [PATCH] SONAR-12720 move Comment to ws-commons.proto --- .../server/issue/ws/SearchResponseFormat.java | 2 +- sonar-ws/src/main/protobuf/ws-commons.proto | 9 +++++++++ sonar-ws/src/main/protobuf/ws-issues.proto | 16 +--------------- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/SearchResponseFormat.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/SearchResponseFormat.java index 02ef9b94ecf..452d4b5690c 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/SearchResponseFormat.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/SearchResponseFormat.java @@ -46,9 +46,9 @@ import org.sonar.server.issue.TextRangeResponseFormatter; import org.sonar.server.issue.workflow.Transition; import org.sonarqube.ws.Common; import org.sonarqube.ws.Common.User; +import org.sonarqube.ws.Common.Comment; import org.sonarqube.ws.Issues; import org.sonarqube.ws.Issues.Actions; -import org.sonarqube.ws.Issues.Comment; import org.sonarqube.ws.Issues.Comments; import org.sonarqube.ws.Issues.Component; import org.sonarqube.ws.Issues.Issue; diff --git a/sonar-ws/src/main/protobuf/ws-commons.proto b/sonar-ws/src/main/protobuf/ws-commons.proto index f94db9af466..73a7b39b6d3 100644 --- a/sonar-ws/src/main/protobuf/ws-commons.proto +++ b/sonar-ws/src/main/protobuf/ws-commons.proto @@ -129,6 +129,15 @@ message Changelog { } } +message Comment { + optional string key = 1; + optional string login = 2; + optional string htmlText = 5; + optional string markdown = 6; + optional bool updatable = 7; + optional string createdAt = 8; +} + message Metric { optional string key = 1; optional string name = 2; diff --git a/sonar-ws/src/main/protobuf/ws-issues.proto b/sonar-ws/src/main/protobuf/ws-issues.proto index fa6c6f65f16..40c0921a813 100644 --- a/sonar-ws/src/main/protobuf/ws-issues.proto +++ b/sonar-ws/src/main/protobuf/ws-issues.proto @@ -164,22 +164,8 @@ message Actions { repeated string actions = 1; } -message Comment { - optional string key = 1; - optional string login = 2; - // TODO drop, it's already in field "users" - optional string email = 3; - // TODO drop, it's already in field "users" - optional string userName = 4; - optional string htmlText = 5; - // TODO rename markdownText ? - optional string markdown = 6; - optional bool updatable = 7; - optional string createdAt = 8; -} - message Comments { - repeated Comment comments = 1; + repeated sonarqube.ws.commons.Comment comments = 1; } // Deprecated since 5.5 -- 2.39.5