summaryrefslogtreecommitdiffstats
path: root/sonar-ws
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2017-08-04 15:44:51 +0200
committerJanos Gyerik <janos.gyerik@sonarsource.com>2017-09-12 10:55:10 +0200
commite96cf158611da3195ced90f4058c2fbfb7c577e1 (patch)
treef2f3ef5e354a5f788adcc91c01f7be2f590fadc9 /sonar-ws
parent5c9f6c0ddd90b00de33f37bd1ce40b10935eaa27 (diff)
downloadsonarqube-e96cf158611da3195ced90f4058c2fbfb7c577e1.tar.gz
sonarqube-e96cf158611da3195ced90f4058c2fbfb7c577e1.zip
SONAR-9616 Support branch in api/components/show
Diffstat (limited to 'sonar-ws')
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsWsParameters.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/component/ShowWsRequest.java13
-rw-r--r--sonar-ws/src/main/protobuf/ws-components.proto1
3 files changed, 13 insertions, 2 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsWsParameters.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsWsParameters.java
index de4f3016a8a..fb0a980be3f 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsWsParameters.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsWsParameters.java
@@ -38,6 +38,7 @@ public class ComponentsWsParameters {
public static final String PARAM_FILTER = "filter";
public static final String PARAM_COMPONENT_ID = "componentId";
public static final String PARAM_COMPONENT = "component";
+ public static final String PARAM_BRANCH = "branch";
private ComponentsWsParameters() {
// static utility class
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ShowWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ShowWsRequest.java
index 696b280a078..1ada1585b8d 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ShowWsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/ShowWsRequest.java
@@ -23,10 +23,9 @@ import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
public class ShowWsRequest {
- @CheckForNull
private String id;
- @CheckForNull
private String key;
+ private String branch;
@CheckForNull
public String getId() {
@@ -47,4 +46,14 @@ public class ShowWsRequest {
this.key = key;
return this;
}
+
+ @CheckForNull
+ public String getBranch() {
+ return branch;
+ }
+
+ public ShowWsRequest setBranch(@Nullable String branch) {
+ this.branch = branch;
+ return this;
+ }
}
diff --git a/sonar-ws/src/main/protobuf/ws-components.proto b/sonar-ws/src/main/protobuf/ws-components.proto
index eba01af28f6..595c580a001 100644
--- a/sonar-ws/src/main/protobuf/ws-components.proto
+++ b/sonar-ws/src/main/protobuf/ws-components.proto
@@ -120,6 +120,7 @@ message Component {
optional string leakPeriodDate = 16;
// Root project key
optional string project = 17;
+ optional string branch = 18;
message Tags {
repeated string tags = 1;