diff options
Diffstat (limited to 'sonar-ws/src/main/protobuf')
-rw-r--r-- | sonar-ws/src/main/protobuf/ws-commons.proto | 9 | ||||
-rw-r--r-- | sonar-ws/src/main/protobuf/ws-projectbranches.proto | 13 |
2 files changed, 13 insertions, 9 deletions
diff --git a/sonar-ws/src/main/protobuf/ws-commons.proto b/sonar-ws/src/main/protobuf/ws-commons.proto index 50a4fa4268c..9690b295d21 100644 --- a/sonar-ws/src/main/protobuf/ws-commons.proto +++ b/sonar-ws/src/main/protobuf/ws-commons.proto @@ -113,3 +113,12 @@ enum RuleType { BUG = 2; VULNERABILITY = 3; } + +enum BranchType { + // Zero is required in order to not get MAINTAINABILITY as default value + // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/ + UNKNOWN_BRANCH_TYPE = 0; + + LONG = 1; + SHORT = 2; +} diff --git a/sonar-ws/src/main/protobuf/ws-projectbranches.proto b/sonar-ws/src/main/protobuf/ws-projectbranches.proto index 4500dc5a784..59f9e9038f5 100644 --- a/sonar-ws/src/main/protobuf/ws-projectbranches.proto +++ b/sonar-ws/src/main/protobuf/ws-projectbranches.proto @@ -24,6 +24,7 @@ option java_package = "org.sonarqube.ws"; option java_outer_classname = "WsBranches"; option optimize_for = SPEED; +import "ws-commons.proto"; // WS api/project_branches/list message ListWsResponse { @@ -38,7 +39,7 @@ message ShowWsResponse { message Branch { optional string name = 1; optional bool isMain = 2; - optional BranchType type = 3; + optional sonarqube.ws.commons.BranchType type = 3; // Merge branch is only present for short living branch optional string mergeBranch = 4; optional Status status = 5; @@ -52,12 +53,6 @@ message Branch { optional int32 codeSmells = 4; } - enum BranchType { - // Zero is required in order to not get MAINTAINABILITY as default value - // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/ - UNKNOWN = 0; - - LONG = 1; - SHORT = 2; - } } + + |