You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ws-issues.proto 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. // SonarQube, open source software quality management tool.
  2. // Copyright (C) 2008-2016 SonarSource
  3. // mailto:contact AT sonarsource DOT com
  4. //
  5. // SonarQube is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU Lesser General Public
  7. // License as published by the Free Software Foundation; either
  8. // version 3 of the License, or (at your option) any later version.
  9. //
  10. // SonarQube is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. // Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with this program; if not, write to the Free Software Foundation,
  17. // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. syntax = "proto2";
  19. package sonarqube.ws.issues;
  20. import "ws-commons.proto";
  21. option java_package = "org.sonarqube.ws";
  22. option java_outer_classname = "Issues";
  23. option optimize_for = SPEED;
  24. // Response of GET api/issues/search
  25. message SearchWsResponse {
  26. optional int64 total = 1;
  27. optional int64 p = 2;
  28. optional int32 ps = 3;
  29. optional sonarqube.ws.commons.Paging paging = 4;
  30. // Total amount of effort, only when the facet "total" is enabled
  31. optional int64 effortTotal = 13;
  32. // Deprecated since 5.5, replaced by effortTotal
  33. optional int64 debtTotal = 5;
  34. repeated Issue issues = 6;
  35. repeated Component components = 7;
  36. optional sonarqube.ws.commons.Rules rules = 8;
  37. optional Users users = 9;
  38. // Deprecated since 5.5, action plan has been removed
  39. optional ActionPlans unusedActionPlans = 10;
  40. optional Languages languages = 11;
  41. optional sonarqube.ws.commons.Facets facets = 12;
  42. }
  43. message Operation {
  44. optional Issue issue = 1;
  45. repeated Component components = 2;
  46. repeated sonarqube.ws.commons.Rule rules = 3;
  47. repeated Users.User users = 4;
  48. }
  49. message AddCommentResponse {
  50. optional Issue issue = 1;
  51. repeated Component components = 2;
  52. repeated sonarqube.ws.commons.Rule rules = 3;
  53. repeated Users.User users = 4;
  54. }
  55. message AssignResponse {
  56. optional Issue issue = 1;
  57. repeated Component components = 2;
  58. repeated sonarqube.ws.commons.Rule rules = 3;
  59. repeated Users.User users = 4;
  60. }
  61. message DeleteCommentResponse {
  62. optional Issue issue = 1;
  63. repeated Component components = 2;
  64. repeated sonarqube.ws.commons.Rule rules = 3;
  65. repeated Users.User users = 4;
  66. }
  67. message DoTransitionResponse {
  68. optional Issue issue = 1;
  69. repeated Component components = 2;
  70. repeated sonarqube.ws.commons.Rule rules = 3;
  71. repeated Users.User users = 4;
  72. }
  73. message SetSeverityResponse {
  74. optional Issue issue = 1;
  75. repeated Component components = 2;
  76. repeated sonarqube.ws.commons.Rule rules = 3;
  77. repeated Users.User users = 4;
  78. }
  79. message SetTagsResponse {
  80. optional Issue issue = 1;
  81. repeated Component components = 2;
  82. repeated sonarqube.ws.commons.Rule rules = 3;
  83. repeated Users.User users = 4;
  84. }
  85. message SetTypeResponse {
  86. optional Issue issue = 1;
  87. repeated Component components = 2;
  88. repeated sonarqube.ws.commons.Rule rules = 3;
  89. repeated Users.User users = 4;
  90. }
  91. message TagsResponse {
  92. repeated string tags = 1;
  93. }
  94. message Issue {
  95. optional string key = 1;
  96. optional string rule = 2;
  97. optional sonarqube.ws.commons.Severity severity = 3;
  98. optional string component = 4;
  99. optional int64 unusedComponentId = 5;
  100. optional string project = 6;
  101. optional string subProject = 7;
  102. optional int32 line = 8;
  103. optional string hash = 31;
  104. optional sonarqube.ws.commons.TextRange textRange = 9;
  105. repeated Flow flows = 10;
  106. optional string resolution = 11;
  107. optional string status = 12;
  108. optional string message = 13;
  109. optional string effort = 28;
  110. // Deprecated since 5.5, replaced by effort
  111. optional string debt = 14;
  112. optional string assignee = 15;
  113. // Unused since 5.5, manual issues feature has been removed
  114. optional string unusedReporter = 16;
  115. // SCM login of the committer who introduced the issue
  116. optional string author = 17;
  117. // Deprecated since 5.5, action plan has been removed
  118. optional string actionPlan = 18;
  119. repeated string tags = 19;
  120. // the transitions allowed for the requesting user.
  121. optional Transitions transitions = 20;
  122. // the actions allowed for the requesting user.
  123. optional Actions actions = 21;
  124. optional Comments comments = 22;
  125. optional string creationDate = 23;
  126. optional string updateDate = 24;
  127. optional string fUpdateAge = 25;
  128. optional string closeDate = 26;
  129. optional sonarqube.ws.commons.RuleType type = 27;
  130. optional string organization = 29;
  131. optional string branch = 30;
  132. optional string pullRequest = 32;
  133. optional string externalRuleEngine = 33;
  134. optional bool fromHotspot = 34;
  135. }
  136. message Transitions {
  137. repeated string transitions = 1;
  138. }
  139. message Actions {
  140. repeated string actions = 1;
  141. }
  142. message Flow {
  143. repeated Location locations = 1;
  144. }
  145. message Location {
  146. optional string component = 4;
  147. optional string unusedComponentId = 1;
  148. // Only when component is a file. Can be empty for a file if this is an issue global to the file.
  149. optional sonarqube.ws.commons.TextRange textRange = 2;
  150. optional string msg = 3;
  151. }
  152. message Comment {
  153. optional string key = 1;
  154. optional string login = 2;
  155. // TODO drop, it's already in field "users"
  156. optional string email = 3;
  157. // TODO drop, it's already in field "users"
  158. optional string userName = 4;
  159. optional string htmlText = 5;
  160. // TODO rename markdownText ?
  161. optional string markdown = 6;
  162. optional bool updatable = 7;
  163. optional string createdAt = 8;
  164. }
  165. message Comments {
  166. repeated Comment comments = 1;
  167. }
  168. // Deprecated since 5.5
  169. message ActionPlan {
  170. optional string key = 1;
  171. optional string name = 2;
  172. // TODO define enum
  173. optional string status = 3;
  174. optional string deadLine = 4;
  175. // TODO to be renamed, is it id or key ?
  176. optional string project = 5;
  177. }
  178. // Deprecated since 5.5
  179. message ActionPlans {
  180. repeated ActionPlan actionPlans = 1;
  181. }
  182. message Language {
  183. optional string key = 1;
  184. optional string name = 2;
  185. }
  186. message Languages {
  187. repeated Language languages = 1;
  188. }
  189. message Component {
  190. optional string organization = 11;
  191. optional int64 deprecatedId = 1;
  192. optional string key = 2;
  193. optional string uuid = 3;
  194. optional bool enabled = 4;
  195. optional string qualifier = 5;
  196. optional string name = 6;
  197. optional string longName = 7;
  198. optional string path = 8;
  199. optional int64 unusedProjectId = 9;
  200. optional int64 unusedSubProjectId = 10;
  201. optional string branch = 12;
  202. optional string pullRequest = 13;
  203. }
  204. // Response of GET api/issues/changelog
  205. message ChangelogWsResponse {
  206. repeated Changelog changelog = 1;
  207. message Changelog {
  208. optional string user = 1;
  209. optional string userName = 2;
  210. // Email is no more returned since 6.3
  211. optional string deprecatedEmail = 3;
  212. optional string creationDate = 4;
  213. repeated Diff diffs = 5;
  214. optional string avatar = 6;
  215. message Diff {
  216. optional string key = 1;
  217. optional string newValue = 2;
  218. optional string oldValue = 3;
  219. }
  220. }
  221. }
  222. // Response of POST api/issues/bulk_change
  223. message BulkChangeWsResponse {
  224. optional int64 total = 1;
  225. optional int64 success = 2;
  226. optional int64 ignored = 3;
  227. optional int64 failures = 4;
  228. }
  229. message Users {
  230. repeated User users = 1;
  231. message User {
  232. optional string login = 1;
  233. optional string name = 2;
  234. optional string avatar = 3;
  235. optional bool active = 4;
  236. }
  237. }
  238. // Response of GET api/issues/authors
  239. message AuthorsResponse {
  240. repeated string authors = 1;
  241. }