Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

ws-qualitygates.proto 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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.qualitygate;
  20. import "ws-commons.proto";
  21. option java_package = "org.sonarqube.ws";
  22. option java_outer_classname = "Qualitygates";
  23. option optimize_for = SPEED;
  24. // GET api/qualitygates/project_status
  25. message ProjectStatusResponse {
  26. optional ProjectStatus projectStatus = 1;
  27. message ProjectStatus {
  28. optional Status status = 1;
  29. repeated Condition conditions = 2;
  30. repeated Period periods = 3;
  31. optional bool ignoredConditions = 4;
  32. optional NewCodePeriod period = 5;
  33. optional bool isCaycCompliant = 6;
  34. }
  35. message Condition {
  36. optional Status status = 1;
  37. optional string metricKey = 2;
  38. optional Comparator comparator = 3;
  39. optional int32 periodIndex = 4;
  40. optional string warningThreshold = 5;
  41. optional string errorThreshold = 6;
  42. optional string actualValue = 7;
  43. }
  44. message NewCodePeriod {
  45. optional string mode = 1;
  46. optional string date = 2;
  47. optional string parameter = 3;
  48. }
  49. message Period {
  50. optional int32 index = 1;
  51. optional string mode = 2;
  52. optional string date = 3;
  53. optional string parameter = 4;
  54. }
  55. enum Status {
  56. OK = 1;
  57. WARN = 2;
  58. ERROR = 3;
  59. NONE = 4;
  60. }
  61. enum Comparator {
  62. GT = 1;
  63. LT = 2;
  64. EQ = 3;
  65. NE = 4;
  66. }
  67. }
  68. // GET api/qualitygates/get_by_project
  69. message GetByProjectResponse {
  70. optional QualityGate qualityGate = 1;
  71. }
  72. message QualityGate {
  73. optional string id = 1;
  74. optional string name = 2;
  75. optional bool default = 3;
  76. }
  77. // GET api/qualitygates/app
  78. message AppResponse {
  79. optional bool edit = 1;
  80. repeated Metric metrics = 3;
  81. message Metric {
  82. optional string key = 1;
  83. optional string name = 2;
  84. optional string type = 3;
  85. optional string domain = 4;
  86. optional bool hidden = 5;
  87. }
  88. }
  89. // POST api/qualitygates/create
  90. message CreateResponse {
  91. optional string id = 1;
  92. optional string name = 2;
  93. }
  94. // POST api/qualitygates/create_condition
  95. message CreateConditionResponse {
  96. optional string id = 1;
  97. optional string metric = 2;
  98. optional string op = 3;
  99. optional string error = 5;
  100. }
  101. // POST api/qualitygates/update_condition
  102. message UpdateConditionResponse {
  103. optional string id = 1;
  104. optional string metric = 2;
  105. optional string op = 3;
  106. optional string error = 5;
  107. }
  108. // GET api/qualitygates/show
  109. message ShowWsResponse {
  110. optional string id = 1;
  111. optional string name = 2;
  112. repeated Condition conditions = 3;
  113. optional bool isBuiltIn = 4;
  114. optional Actions actions = 5;
  115. optional bool isCaycCompliant = 6;
  116. message Condition {
  117. optional string id = 1;
  118. optional string metric = 2;
  119. optional string op = 4;
  120. optional string error = 6;
  121. }
  122. }
  123. // GET api/qualitygates/search
  124. message SearchResponse {
  125. // Deprecated since 7.9
  126. optional bool more = 1;
  127. repeated Result results = 2;
  128. optional sonarqube.ws.commons.Paging paging = 3;
  129. message Result {
  130. optional string name = 2;
  131. optional bool selected = 3;
  132. optional string key = 4;
  133. }
  134. }
  135. // GET api/qualitygates/list
  136. message ListWsResponse {
  137. repeated QualityGate qualitygates = 1;
  138. // Deprecated since 7.0
  139. optional string default = 2;
  140. optional RootActions actions = 3;
  141. message QualityGate {
  142. optional string id = 1;
  143. optional string name = 2;
  144. optional bool isDefault = 3;
  145. optional bool isBuiltIn = 4;
  146. optional Actions actions = 5;
  147. optional bool isCaycCompliant = 6;
  148. }
  149. message RootActions {
  150. optional bool create = 1;
  151. }
  152. }
  153. message Actions {
  154. optional bool rename = 1;
  155. optional bool setAsDefault = 2;
  156. optional bool copy = 3;
  157. optional bool associateProjects = 4;
  158. optional bool delete = 5;
  159. optional bool manageConditions = 6;
  160. optional bool delegate = 7;
  161. }
  162. // WS api/qualitygates/search_users
  163. message SearchUsersResponse {
  164. optional sonarqube.ws.commons.Paging paging = 1;
  165. repeated User users = 2;
  166. message User {
  167. optional string login = 1;
  168. optional string name = 2;
  169. optional string avatar = 3;
  170. optional bool selected = 4;
  171. }
  172. }
  173. // WS api/qualitygates/search_groups
  174. message SearchGroupsResponse {
  175. optional sonarqube.ws.commons.Paging paging = 1;
  176. repeated Group groups = 2;
  177. message Group {
  178. optional string name = 1;
  179. optional string description = 2;
  180. optional bool selected = 3;
  181. }
  182. }