Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

ws-qualitygates.proto 4.2KB

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