aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2018-02-01 15:30:48 +0100
committerTeryk Bellahsene <teryk@users.noreply.github.com>2018-03-13 14:05:36 +0100
commit751e4000e40a4af66b80767d632b1bef64dc5647 (patch)
tree0bf9735c29f6bae50ec10c11d8fbf7e50e909722 /sonar-ws
parent23e4b51cde3ed0dc76ca1d73aa6cc31715dd25d4 (diff)
downloadsonarqube-751e4000e40a4af66b80767d632b1bef64dc5647.tar.gz
sonarqube-751e4000e40a4af66b80767d632b1bef64dc5647.zip
MMF-1134 Make pull request a 1st class citizen
SONAR-10366 Add pull request object to api/project_branches/list and api/ce/activity SONAR-10365 Analyze pull requests as 1st class citizen SONAR-10366 SONAR-10367 Create WS api/projet_pull_requests/list and delete SONAR-10383 Add Pull Request information when listing CE tasks SONAR-10365 Add key type in PROJECT_BRANCHES (#3063) SONAR-10371 Add pullRequest parameter in the Web API (#3076) * ComponentFinder searches by branch or pull request * Add pullRequest parameter to WS api/issues/* WS * Add pullRequest parameter to api/settings/* WS * Add pullRequest parameter to api/badges/* WS * Add pullRequest parameter to api/components/* WS * Add pullRequest parameter to api/sources/* WS SONAR-10368 Copy issue states from pull request after it's merged SONAR-10373 Send notifications for events on issues of a pull request SONAR-10365 Add pull_request_binary column in project_branches (#3073) SONAR-10433 Store pull request in projects table SONAR-10371 Add pullRequest field in the Web API SONAR-10365 Analyze pull requests as 1st class citizen BRANCH-45 Expose issue resolution for PR decoration BRANCH-49 Basic support of pull request analysis on pull request branch BRANCH-47 Fail when user tries to analyze a pull request and the plugin is not available SONAR-10366 update pull request decorated links to project and issues SONAR-10365 Use pull request id as key instead of branch name SONAR-10454 Update embedded Git 1.4 and SVN 1.7 SONAR-10365 rename sonar.pullrequest.id to sonar.pullrequest.key SONAR-10383 api/navigation/component returns the pull request key
Diffstat (limited to 'sonar-ws')
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java10
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java3
-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/components/AppRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/components/ComponentsService.java5
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/components/ShowRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/components/TreeRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/duplications/DuplicationsService.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/duplications/ShowRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/issues/SearchRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/measures/ComponentRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/measures/ComponentTreeRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/measures/MeasuresService.java5
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/measures/SearchHistoryRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/navigation/ComponentRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/navigation/NavigationService.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/permissions/TemplateGroupsRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projectanalyses/ProjectAnalysesService.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projectanalyses/SearchRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java4
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/DeleteRequest.java62
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/ListRequest.java48
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/ProjectPullRequestsService.java70
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/package-info.java25
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CopyRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CreateConditionRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CreateRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DeleteConditionRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DeselectRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DestroyRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/GetByProjectRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ListRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ProjectStatusRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/QualitygatesService.java11
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/RenameRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SearchRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SelectRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SetAsDefaultRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ShowRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/UpdateConditionRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/rules/SearchRequest.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ListDefinitionsRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ResetRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/settings/SetRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/settings/SettingsService.java8
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ValuesRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/sources/LinesRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/sources/RawRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/sources/SourcesService.java2
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/tests/ListRequest.java14
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/tests/TestsService.java1
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/users/SetHomepageRequest.java67
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java16
-rw-r--r--sonar-ws/src/main/protobuf/ws-ce.proto2
-rw-r--r--sonar-ws/src/main/protobuf/ws-commons.proto1
-rw-r--r--sonar-ws/src/main/protobuf/ws-components.proto1
-rw-r--r--sonar-ws/src/main/protobuf/ws-duplications.proto1
-rw-r--r--sonar-ws/src/main/protobuf/ws-issues.proto2
-rw-r--r--sonar-ws/src/main/protobuf/ws-measures.proto1
-rw-r--r--sonar-ws/src/main/protobuf/ws-projectbranches.proto17
-rw-r--r--sonar-ws/src/main/protobuf/ws-projectpullrequests.proto49
-rw-r--r--sonar-ws/src/main/protobuf/ws-tests.proto2
64 files changed, 652 insertions, 22 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java
index 3c5e64ec06a..bdbbbf90c62 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java
@@ -45,8 +45,9 @@ import org.sonarqube.ws.client.profiles.ProfilesService;
import org.sonarqube.ws.client.projectanalyses.ProjectAnalysesService;
import org.sonarqube.ws.client.projectbranches.ProjectBranchesService;
import org.sonarqube.ws.client.projectlinks.ProjectLinksService;
-import org.sonarqube.ws.client.projecttags.ProjectTagsService;
+import org.sonarqube.ws.client.projectpullrequests.ProjectPullRequestsService;
import org.sonarqube.ws.client.projects.ProjectsService;
+import org.sonarqube.ws.client.projecttags.ProjectTagsService;
import org.sonarqube.ws.client.properties.PropertiesService;
import org.sonarqube.ws.client.qualitygates.QualitygatesService;
import org.sonarqube.ws.client.qualityprofiles.QualityprofilesService;
@@ -102,6 +103,7 @@ class DefaultWsClient implements WsClient {
private final ProjectAnalysesService projectAnalysesService;
private final ProjectBranchesService projectBranchesService;
private final ProjectLinksService projectLinksService;
+ private final ProjectPullRequestsService projectPullRequestsService;
private final ProjectTagsService projectTagsService;
private final ProjectsService projectsService;
private final PropertiesService propertiesService;
@@ -152,6 +154,7 @@ class DefaultWsClient implements WsClient {
this.projectAnalysesService = new ProjectAnalysesService(wsConnector);
this.projectBranchesService = new ProjectBranchesService(wsConnector);
this.projectLinksService = new ProjectLinksService(wsConnector);
+ this.projectPullRequestsService = new ProjectPullRequestsService(wsConnector);
this.projectTagsService = new ProjectTagsService(wsConnector);
this.projectsService = new ProjectsService(wsConnector);
this.propertiesService = new PropertiesService(wsConnector);
@@ -303,6 +306,11 @@ class DefaultWsClient implements WsClient {
}
@Override
+ public ProjectPullRequestsService projectPullRequests() {
+ return projectPullRequestsService;
+ }
+
+ @Override
public ProjectTagsService projectTags() {
return projectTagsService;
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java
index 570b96cef47..79ca15098c2 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java
@@ -45,6 +45,7 @@ import org.sonarqube.ws.client.profiles.ProfilesService;
import org.sonarqube.ws.client.projectanalyses.ProjectAnalysesService;
import org.sonarqube.ws.client.projectbranches.ProjectBranchesService;
import org.sonarqube.ws.client.projectlinks.ProjectLinksService;
+import org.sonarqube.ws.client.projectpullrequests.ProjectPullRequestsService;
import org.sonarqube.ws.client.projecttags.ProjectTagsService;
import org.sonarqube.ws.client.projects.ProjectsService;
import org.sonarqube.ws.client.properties.PropertiesService;
@@ -139,6 +140,8 @@ public interface WsClient {
ProjectLinksService projectLinks();
+ ProjectPullRequestsService projectPullRequests();
+
ProjectTagsService projectTags();
ProjectsService projects();
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 5e726b0eafb..f6fdf792115 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
@@ -39,6 +39,7 @@ public class ComponentsWsParameters {
public static final String PARAM_COMPONENT_ID = "componentId";
public static final String PARAM_COMPONENT = "component";
public static final String PARAM_BRANCH = "branch";
+ public static final String PARAM_PULL_REQUEST = "pullRequest";
private ComponentsWsParameters() {
// static utility class
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/components/AppRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/components/AppRequest.java
index 772651aa090..14441f113b9 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/components/AppRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/components/AppRequest.java
@@ -34,6 +34,7 @@ public class AppRequest {
private String branch;
private String component;
private String componentId;
+ private String pullRequest;
/**
* This is part of the internal API.
@@ -73,4 +74,17 @@ public class AppRequest {
public String getComponentId() {
return componentId;
}
+
+ /**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public AppRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/components/ComponentsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/components/ComponentsService.java
index 483474301b1..bc8d556b033 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/components/ComponentsService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/components/ComponentsService.java
@@ -55,6 +55,7 @@ public class ComponentsService extends BaseService {
.setParam("branch", request.getBranch())
.setParam("component", request.getComponent())
.setParam("componentId", request.getComponentId())
+ .setParam("pullRequest", request.getPullRequest())
.setMediaType(MediaTypes.JSON)
).content();
}
@@ -111,7 +112,8 @@ public class ComponentsService extends BaseService {
new GetRequest(path("show"))
.setParam("branch", request.getBranch())
.setParam("component", request.getComponent())
- .setParam("componentId", request.getComponentId()),
+ .setParam("componentId", request.getComponentId())
+ .setParam("pullRequest", request.getPullRequest()),
ShowWsResponse.parser());
}
@@ -147,6 +149,7 @@ public class ComponentsService extends BaseService {
.setParam("componentId", request.getComponentId())
.setParam("p", request.getP())
.setParam("ps", request.getPs())
+ .setParam("pullRequest", request.getPullRequest())
.setParam("q", request.getQ())
.setParam("qualifiers", request.getQualifiers() == null ? null : request.getQualifiers().stream().collect(Collectors.joining(",")))
.setParam("s", request.getS() == null ? null : request.getS().stream().collect(Collectors.joining(",")))
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/components/ShowRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/components/ShowRequest.java
index b6306545598..4a04cd56d1b 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/components/ShowRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/components/ShowRequest.java
@@ -34,6 +34,7 @@ public class ShowRequest {
private String branch;
private String component;
private String componentId;
+ private String pullRequest;
/**
* This is part of the internal API.
@@ -73,4 +74,17 @@ public class ShowRequest {
public String getComponentId() {
return componentId;
}
+
+ /**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public ShowRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/components/TreeRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/components/TreeRequest.java
index 4aae16c2d9c..82ae76cb9a6 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/components/TreeRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/components/TreeRequest.java
@@ -37,6 +37,7 @@ public class TreeRequest {
private String componentId;
private String p;
private String ps;
+ private String pullRequest;
private String q;
private List<String> qualifiers;
private List<String> s;
@@ -124,6 +125,19 @@ public class TreeRequest {
}
/**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public TreeRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
+
+ /**
* Example value: "FILE_NAM"
*/
public TreeRequest setQ(String q) {
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/duplications/DuplicationsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/duplications/DuplicationsService.java
index de57a61729d..dc68920fc3d 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/duplications/DuplicationsService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/duplications/DuplicationsService.java
@@ -50,6 +50,7 @@ public class DuplicationsService extends BaseService {
new GetRequest(path("show"))
.setParam("branch", request.getBranch())
.setParam("key", request.getKey())
+ .setParam("pullRequest", request.getPullRequest())
.setParam("uuid", request.getUuid()),
ShowResponse.parser());
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/duplications/ShowRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/duplications/ShowRequest.java
index 0ee02965ce5..333618abb66 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/duplications/ShowRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/duplications/ShowRequest.java
@@ -33,6 +33,7 @@ public class ShowRequest {
private String branch;
private String key;
+ private String pullRequest;
private String uuid;
/**
@@ -61,6 +62,19 @@ public class ShowRequest {
}
/**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public ShowRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
+
+ /**
* Example value: "584a89f2-8037-4f7b-b82c-8b45d2d63fb2"
* @deprecated since 6.5
*/
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java
index 3dbaa54c9fd..0032e024f4d 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java
@@ -70,6 +70,7 @@ public class IssuesWsParameters {
public static final String PARAM_FILE_UUIDS = "fileUuids";
public static final String PARAM_ON_COMPONENT_ONLY = "onComponentOnly";
public static final String PARAM_BRANCH = "branch";
+ public static final String PARAM_PULL_REQUEST = "pullRequest";
public static final String PARAM_ORGANIZATION = "organization";
public static final String PARAM_RULES = "rules";
public static final String PARAM_ACTIONS = "actions";
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java
index 28a7ebe3775..75918c48fad 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java
@@ -232,6 +232,7 @@ public class IssuesService extends BaseService {
.setParam("projectUuids", request.getProjectUuids() == null ? null : request.getProjectUuids().stream().collect(Collectors.joining(",")))
.setParam("projects", request.getProjects() == null ? null : request.getProjects().stream().collect(Collectors.joining(",")))
.setParam("ps", request.getPs())
+ .setParam("pullRequest", request.getPullRequest())
.setParam("resolutions", request.getResolutions() == null ? null : request.getResolutions().stream().collect(Collectors.joining(",")))
.setParam("resolved", request.getResolved())
.setParam("rules", request.getRules() == null ? null : request.getRules().stream().collect(Collectors.joining(",")))
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/SearchRequest.java
index 3e5def5f536..74096bdde58 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/SearchRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/SearchRequest.java
@@ -59,6 +59,7 @@ public class SearchRequest {
private List<String> projectUuids;
private List<String> projects;
private String ps;
+ private String pullRequest;
private List<String> resolutions;
private String resolved;
private List<String> rules;
@@ -470,6 +471,19 @@ public class SearchRequest {
}
/**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public SearchRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
+
+ /**
* Example value: "FIXED,REMOVED"
* Possible values:
* <ul>
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/ComponentRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/ComponentRequest.java
index 5029fb0e572..fa8041a095d 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/ComponentRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/ComponentRequest.java
@@ -38,6 +38,7 @@ public class ComponentRequest {
private String developerId;
private String developerKey;
private List<String> metricKeys;
+ private String pullRequest;
/**
* Example value: "periods,metrics"
@@ -133,4 +134,17 @@ public class ComponentRequest {
public List<String> getMetricKeys() {
return metricKeys;
}
+
+ /**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public ComponentRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/ComponentTreeRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/ComponentTreeRequest.java
index 8799bf1bc5c..d9416aa81c9 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/ComponentTreeRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/ComponentTreeRequest.java
@@ -44,6 +44,7 @@ public class ComponentTreeRequest {
private String metricSortFilter;
private String p;
private String ps;
+ private String pullRequest;
private String q;
private List<String> qualifiers;
private List<String> s;
@@ -230,6 +231,19 @@ public class ComponentTreeRequest {
}
/**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public ComponentTreeRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
+
+ /**
* Example value: "FILE_NAM"
*/
public ComponentTreeRequest setQ(String q) {
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/MeasuresService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/MeasuresService.java
index 06e82e95def..f9662d04ace 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/MeasuresService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/MeasuresService.java
@@ -57,7 +57,8 @@ public class MeasuresService extends BaseService {
.setParam("componentId", request.getComponentId())
.setParam("developerId", request.getDeveloperId())
.setParam("developerKey", request.getDeveloperKey())
- .setParam("metricKeys", request.getMetricKeys() == null ? null : request.getMetricKeys().stream().collect(Collectors.joining(","))),
+ .setParam("metricKeys", request.getMetricKeys() == null ? null : request.getMetricKeys().stream().collect(Collectors.joining(",")))
+ .setParam("pullRequest", request.getPullRequest()),
ComponentWsResponse.parser());
}
@@ -84,6 +85,7 @@ public class MeasuresService extends BaseService {
.setParam("metricSortFilter", request.getMetricSortFilter())
.setParam("p", request.getP())
.setParam("ps", request.getPs())
+ .setParam("pullRequest", request.getPullRequest())
.setParam("q", request.getQ())
.setParam("qualifiers", request.getQualifiers() == null ? null : request.getQualifiers().stream().collect(Collectors.joining(",")))
.setParam("s", request.getS() == null ? null : request.getS().stream().collect(Collectors.joining(",")))
@@ -122,6 +124,7 @@ public class MeasuresService extends BaseService {
.setParam("metrics", request.getMetrics() == null ? null : request.getMetrics().stream().collect(Collectors.joining(",")))
.setParam("p", request.getP())
.setParam("ps", request.getPs())
+ .setParam("pullRequest", request.getPullRequest())
.setParam("to", request.getTo()),
SearchHistoryResponse.parser());
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/SearchHistoryRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/SearchHistoryRequest.java
index 37f2b02da89..04395aff33a 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/SearchHistoryRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/measures/SearchHistoryRequest.java
@@ -37,6 +37,7 @@ public class SearchHistoryRequest {
private List<String> metrics;
private String p;
private String ps;
+ private String pullRequest;
private String to;
/**
@@ -115,6 +116,19 @@ public class SearchHistoryRequest {
}
/**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public SearchHistoryRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
+
+ /**
* Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
*/
public SearchHistoryRequest setTo(String to) {
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/navigation/ComponentRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/navigation/ComponentRequest.java
index 5dc8aa75360..a442f0092c7 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/navigation/ComponentRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/navigation/ComponentRequest.java
@@ -33,6 +33,7 @@ public class ComponentRequest {
private String branch;
private String component;
+ private String pullRequest;
/**
* This is part of the internal API.
@@ -58,4 +59,17 @@ public class ComponentRequest {
public String getComponent() {
return component;
}
+
+ /**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public ComponentRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/navigation/NavigationService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/navigation/NavigationService.java
index 7dcbc5090f4..0b8edf6a5b4 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/navigation/NavigationService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/navigation/NavigationService.java
@@ -49,6 +49,7 @@ public class NavigationService extends BaseService {
new GetRequest(path("component"))
.setParam("branch", request.getBranch())
.setParam("component", request.getComponent())
+ .setParam("pullRequest", request.getPullRequest())
.setMediaType(MediaTypes.JSON)
).content();
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permissions/TemplateGroupsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permissions/TemplateGroupsRequest.java
index 5388364e035..04d9b272bce 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/permissions/TemplateGroupsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/permissions/TemplateGroupsRequest.java
@@ -65,7 +65,6 @@ public class TemplateGroupsRequest {
}
/**
- * This is a mandatory parameter.
* Possible values:
* <ul>
* <li>"admin"</li>
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectanalyses/ProjectAnalysesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectanalyses/ProjectAnalysesService.java
index 3166e6f8215..10ab3a2efba 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectanalyses/ProjectAnalysesService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectanalyses/ProjectAnalysesService.java
@@ -102,6 +102,7 @@ public class ProjectAnalysesService extends BaseService {
.setParam("p", request.getP())
.setParam("project", request.getProject())
.setParam("ps", request.getPs())
+ .setParam("pullRequest", request.getPullRequest())
.setParam("to", request.getTo()),
SearchResponse.parser());
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectanalyses/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectanalyses/SearchRequest.java
index 83e00959d0e..1f81fa87296 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectanalyses/SearchRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectanalyses/SearchRequest.java
@@ -37,6 +37,7 @@ public class SearchRequest {
private String p;
private String project;
private String ps;
+ private String pullRequest;
private String to;
/**
@@ -121,6 +122,19 @@ public class SearchRequest {
}
/**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public SearchRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
+
+ /**
* Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
*/
public SearchRequest setTo(String to) {
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java
index 1a65b559e8b..9eca20837c9 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java
@@ -45,8 +45,8 @@ public class ProjectBranchesService extends BaseService {
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_branches/delete">Further information about this action online (including a response example)</a>
* @since 6.6
*/
- public String delete(DeleteRequest request) {
- return call(
+ public void delete(DeleteRequest request) {
+ call(
new PostRequest(path("delete"))
.setParam("branch", request.getBranch())
.setParam("project", request.getProject())
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/DeleteRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/DeleteRequest.java
new file mode 100644
index 00000000000..aaaf8869bf7
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/DeleteRequest.java
@@ -0,0 +1,62 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonarqube.ws.client.projectpullrequests;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_pull_requests/delete">Further information about this action online (including a response example)</a>
+ * @since 7.1
+ */
+@Generated("sonar-ws-generator")
+public class DeleteRequest {
+
+ private String project;
+ private String pullRequest;
+
+ /**
+ * This is a mandatory parameter.
+ * Example value: "my_project"
+ */
+ public DeleteRequest setProject(String project) {
+ this.project = project;
+ return this;
+ }
+
+ public String getProject() {
+ return project;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ * Example value: "1543"
+ */
+ public DeleteRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/ListRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/ListRequest.java
new file mode 100644
index 00000000000..fe7d93ef0bd
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/ListRequest.java
@@ -0,0 +1,48 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonarqube.ws.client.projectpullrequests;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_pull_requests/list">Further information about this action online (including a response example)</a>
+ * @since 7.1
+ */
+@Generated("sonar-ws-generator")
+public class ListRequest {
+
+ private String project;
+
+ /**
+ * This is a mandatory parameter.
+ * Example value: "my_project"
+ */
+ public ListRequest setProject(String project) {
+ this.project = project;
+ return this;
+ }
+
+ public String getProject() {
+ return project;
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/ProjectPullRequestsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/ProjectPullRequestsService.java
new file mode 100644
index 00000000000..b7ba3dabc18
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/ProjectPullRequestsService.java
@@ -0,0 +1,70 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonarqube.ws.client.projectpullrequests;
+
+import java.util.stream.Collectors;
+import javax.annotation.Generated;
+import org.sonarqube.ws.MediaTypes;
+import org.sonarqube.ws.client.BaseService;
+import org.sonarqube.ws.client.GetRequest;
+import org.sonarqube.ws.client.PostRequest;
+import org.sonarqube.ws.client.WsConnector;
+import org.sonarqube.ws.ProjectPullRequests.ListWsResponse;
+
+/**
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_pull_requests">Further information about this web service online</a>
+ */
+@Generated("sonar-ws-generator")
+public class ProjectPullRequestsService extends BaseService {
+
+ public ProjectPullRequestsService(WsConnector wsConnector) {
+ super(wsConnector, "api/project_pull_requests");
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_pull_requests/delete">Further information about this action online (including a response example)</a>
+ * @since 7.1
+ */
+ public void delete(DeleteRequest request) {
+ call(
+ new PostRequest(path("delete"))
+ .setParam("project", request.getProject())
+ .setParam("pullRequest", request.getPullRequest())
+ .setMediaType(MediaTypes.JSON)
+ ).content();
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a GET request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_pull_requests/list">Further information about this action online (including a response example)</a>
+ * @since 7.1
+ */
+ public ListWsResponse list(ListRequest request) {
+ return call(
+ new GetRequest(path("list"))
+ .setParam("project", request.getProject()),
+ ListWsResponse.parser());
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/package-info.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/package-info.java
new file mode 100644
index 00000000000..e742bab1d5e
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectpullrequests/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@ParametersAreNonnullByDefault
+@Generated("sonar-ws-generator")
+package org.sonarqube.ws.client.projectpullrequests;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+import javax.annotation.Generated;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CopyRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CopyRequest.java
index dffd09b323a..c0615b16482 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CopyRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CopyRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CreateConditionRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CreateConditionRequest.java
index ebc887524f4..0ef25a4c881 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CreateConditionRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CreateConditionRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CreateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CreateRequest.java
index 31ba90f154f..0fb572e240b 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CreateRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/CreateRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DeleteConditionRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DeleteConditionRequest.java
index 6f9c7d6a308..d85bf386d0f 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DeleteConditionRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DeleteConditionRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DeselectRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DeselectRequest.java
index f3ea2174093..2b7603aef0a 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DeselectRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DeselectRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DestroyRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DestroyRequest.java
index 3e2169d78d1..89c817d1863 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DestroyRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/DestroyRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/GetByProjectRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/GetByProjectRequest.java
index f07bc686d31..809241b5fe4 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/GetByProjectRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/GetByProjectRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ListRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ListRequest.java
index 2f998f79002..01b75ec4e47 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ListRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ListRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ProjectStatusRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ProjectStatusRequest.java
index 64272965eed..557d4f53bf6 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ProjectStatusRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ProjectStatusRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/QualitygatesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/QualitygatesService.java
index 662524360a7..1c65c9e9181 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/QualitygatesService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/QualitygatesService.java
@@ -19,20 +19,21 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.stream.Collectors;
import javax.annotation.Generated;
import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.Qualitygates.CreateConditionResponse;
+import org.sonarqube.ws.client.BaseService;
+import org.sonarqube.ws.client.GetRequest;
+import org.sonarqube.ws.client.PostRequest;
+import org.sonarqube.ws.client.WsConnector;
import org.sonarqube.ws.Qualitygates.CreateResponse;
+import org.sonarqube.ws.Qualitygates.CreateConditionResponse;
import org.sonarqube.ws.Qualitygates.GetByProjectResponse;
import org.sonarqube.ws.Qualitygates.ListWsResponse;
import org.sonarqube.ws.Qualitygates.ProjectStatusResponse;
import org.sonarqube.ws.Qualitygates.SearchResponse;
import org.sonarqube.ws.Qualitygates.ShowWsResponse;
import org.sonarqube.ws.Qualitygates.UpdateConditionResponse;
-import org.sonarqube.ws.client.BaseService;
-import org.sonarqube.ws.client.GetRequest;
-import org.sonarqube.ws.client.PostRequest;
-import org.sonarqube.ws.client.WsConnector;
/**
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates">Further information about this web service online</a>
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/RenameRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/RenameRequest.java
index f08636bda92..d98af61c139 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/RenameRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/RenameRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SearchRequest.java
index ec39eb47fff..a7bcf5b94bd 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SearchRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SearchRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SelectRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SelectRequest.java
index 146cda0c09e..e5bd51005c5 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SelectRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SelectRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SetAsDefaultRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SetAsDefaultRequest.java
index 7bdc088ec18..2692abf157c 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SetAsDefaultRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/SetAsDefaultRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ShowRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ShowRequest.java
index 5bdcfa8214f..b36b8a4e2f5 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ShowRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/ShowRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/UpdateConditionRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/UpdateConditionRequest.java
index 77934588782..8435549d125 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/UpdateConditionRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/UpdateConditionRequest.java
@@ -19,6 +19,7 @@
*/
package org.sonarqube.ws.client.qualitygates;
+import java.util.List;
import javax.annotation.Generated;
/**
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/SearchRequest.java
index 0a15f7f8500..bb974145015 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/SearchRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/rules/SearchRequest.java
@@ -162,6 +162,7 @@ public class SearchRequest {
* <li>"remFn"</li>
* <li>"remFnOverloaded"</li>
* <li>"repo"</li>
+ * <li>"scope"</li>
* <li>"severity"</li>
* <li>"status"</li>
* <li>"sysTags"</li>
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ListDefinitionsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ListDefinitionsRequest.java
index 97859d258cd..716f8c45347 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ListDefinitionsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ListDefinitionsRequest.java
@@ -33,6 +33,7 @@ public class ListDefinitionsRequest {
private String branch;
private String component;
+ private String pullRequest;
/**
* This is part of the internal API.
@@ -58,4 +59,17 @@ public class ListDefinitionsRequest {
public String getComponent() {
return component;
}
+
+ /**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public ListDefinitionsRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ResetRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ResetRequest.java
index 8d47493a4b9..6f1e6d771da 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ResetRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ResetRequest.java
@@ -34,6 +34,7 @@ public class ResetRequest {
private String branch;
private String component;
private List<String> keys;
+ private String pullRequest;
/**
* This is part of the internal API.
@@ -72,4 +73,17 @@ public class ResetRequest {
public List<String> getKeys() {
return keys;
}
+
+ /**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public ResetRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/SetRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/SetRequest.java
index ef5da8de676..819d0bf0d8b 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/SetRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/SetRequest.java
@@ -35,6 +35,7 @@ public class SetRequest {
private String component;
private List<String> fieldValues;
private String key;
+ private String pullRequest;
private String value;
private List<String> values;
@@ -89,6 +90,19 @@ public class SetRequest {
}
/**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public SetRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
+
+ /**
* Example value: "git@github.com:SonarSource/sonarqube.git"
*/
public SetRequest setValue(String value) {
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/SettingsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/SettingsService.java
index f920dbb7a1a..d3b64a5579e 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/SettingsService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/SettingsService.java
@@ -93,7 +93,8 @@ public class SettingsService extends BaseService {
return call(
new GetRequest(path("list_definitions"))
.setParam("branch", request.getBranch())
- .setParam("component", request.getComponent()),
+ .setParam("component", request.getComponent())
+ .setParam("pullRequest", request.getPullRequest()),
ListDefinitionsWsResponse.parser());
}
@@ -110,6 +111,7 @@ public class SettingsService extends BaseService {
.setParam("branch", request.getBranch())
.setParam("component", request.getComponent())
.setParam("keys", request.getKeys() == null ? null : request.getKeys().stream().collect(Collectors.joining(",")))
+ .setParam("pullRequest", request.getPullRequest())
.setMediaType(MediaTypes.JSON)
).content();
}
@@ -128,6 +130,7 @@ public class SettingsService extends BaseService {
.setParam("component", request.getComponent())
.setParam("fieldValues", request.getFieldValues() == null ? null : request.getFieldValues())
.setParam("key", request.getKey())
+ .setParam("pullRequest", request.getPullRequest())
.setParam("value", request.getValue())
.setParam("values", request.getValues() == null ? null : request.getValues())
.setMediaType(MediaTypes.JSON)
@@ -146,7 +149,8 @@ public class SettingsService extends BaseService {
new GetRequest(path("values"))
.setParam("branch", request.getBranch())
.setParam("component", request.getComponent())
- .setParam("keys", request.getKeys() == null ? null : request.getKeys().stream().collect(Collectors.joining(","))),
+ .setParam("keys", request.getKeys() == null ? null : request.getKeys().stream().collect(Collectors.joining(",")))
+ .setParam("pullRequest", request.getPullRequest()),
ValuesWsResponse.parser());
}
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ValuesRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ValuesRequest.java
index 3d7da5ea1cd..be37e21c8d0 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ValuesRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/settings/ValuesRequest.java
@@ -34,6 +34,7 @@ public class ValuesRequest {
private String branch;
private String component;
private List<String> keys;
+ private String pullRequest;
/**
* This is part of the internal API.
@@ -71,4 +72,17 @@ public class ValuesRequest {
public List<String> getKeys() {
return keys;
}
+
+ /**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public ValuesRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/sources/LinesRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/sources/LinesRequest.java
index c100ee46691..00848510f63 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/sources/LinesRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/sources/LinesRequest.java
@@ -34,6 +34,7 @@ public class LinesRequest {
private String branch;
private String from;
private String key;
+ private String pullRequest;
private String to;
private String uuid;
@@ -75,6 +76,19 @@ public class LinesRequest {
}
/**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public LinesRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
+
+ /**
* Example value: "20"
*/
public LinesRequest setTo(String to) {
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/sources/RawRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/sources/RawRequest.java
index 7fccf661dbf..5a7652b6717 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/sources/RawRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/sources/RawRequest.java
@@ -33,6 +33,7 @@ public class RawRequest {
private String branch;
private String key;
+ private String pullRequest;
/**
* This is part of the internal API.
@@ -59,4 +60,17 @@ public class RawRequest {
public String getKey() {
return key;
}
+
+ /**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public RawRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/sources/SourcesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/sources/SourcesService.java
index 37795a4e13c..f8fe1a17b1e 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/sources/SourcesService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/sources/SourcesService.java
@@ -82,6 +82,7 @@ public class SourcesService extends BaseService {
.setParam("branch", request.getBranch())
.setParam("from", request.getFrom())
.setParam("key", request.getKey())
+ .setParam("pullRequest", request.getPullRequest())
.setParam("to", request.getTo())
.setParam("uuid", request.getUuid())
.setMediaType(MediaTypes.JSON)
@@ -100,6 +101,7 @@ public class SourcesService extends BaseService {
new GetRequest(path("raw"))
.setParam("branch", request.getBranch())
.setParam("key", request.getKey())
+ .setParam("pullRequest", request.getPullRequest())
.setMediaType(MediaTypes.JSON)
).content();
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/tests/ListRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/tests/ListRequest.java
index 6e445f06c85..a7a38ca8cd6 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/tests/ListRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/tests/ListRequest.java
@@ -34,6 +34,7 @@ public class ListRequest {
private String branch;
private String p;
private String ps;
+ private String pullRequest;
private String sourceFileId;
private String sourceFileKey;
private String sourceFileLineNumber;
@@ -79,6 +80,19 @@ public class ListRequest {
}
/**
+ * This is part of the internal API.
+ * Example value: "5461"
+ */
+ public ListRequest setPullRequest(String pullRequest) {
+ this.pullRequest = pullRequest;
+ return this;
+ }
+
+ public String getPullRequest() {
+ return pullRequest;
+ }
+
+ /**
* Example value: "AU-TpxcA-iU5OvuD2FL0"
*/
public ListRequest setSourceFileId(String sourceFileId) {
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/tests/TestsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/tests/TestsService.java
index 2552c9a1a99..3683b5d79c7 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/tests/TestsService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/tests/TestsService.java
@@ -72,6 +72,7 @@ public class TestsService extends BaseService {
.setParam("branch", request.getBranch())
.setParam("p", request.getP())
.setParam("ps", request.getPs())
+ .setParam("pullRequest", request.getPullRequest())
.setParam("sourceFileId", request.getSourceFileId())
.setParam("sourceFileKey", request.getSourceFileKey())
.setParam("sourceFileLineNumber", request.getSourceFileLineNumber())
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SetHomepageRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SetHomepageRequest.java
new file mode 100644
index 00000000000..8ad79cc9590
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SetHomepageRequest.java
@@ -0,0 +1,67 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonarqube.ws.client.users;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/set_homepage">Further information about this action online (including a response example)</a>
+ * @since 7.0
+ */
+@Generated("sonar-ws-generator")
+public class SetHomepageRequest {
+
+ private String parameter;
+ private String type;
+
+ /**
+ * Example value: "my_project"
+ */
+ public SetHomepageRequest setParameter(String parameter) {
+ this.parameter = parameter;
+ return this;
+ }
+
+ public String getParameter() {
+ return parameter;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ * Possible values:
+ * <ul>
+ * <li>"PROJECT"</li>
+ * <li>"ORGANIZATION"</li>
+ * <li>"MY_PROJECTS"</li>
+ * <li>"MY_ISSUES"</li>
+ * </ul>
+ */
+ public SetHomepageRequest setType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ public String getType() {
+ return type;
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java
index c490b22eeb0..3dcec5eaa39 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java
@@ -160,6 +160,22 @@ public class UsersService extends BaseService {
*
* This is part of the internal API.
* This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/set_homepage">Further information about this action online (including a response example)</a>
+ * @since 7.0
+ */
+ public void setHomepage(SetHomepageRequest request) {
+ call(
+ new PostRequest(path("set_homepage"))
+ .setParam("parameter", request.getParameter())
+ .setParam("type", request.getType())
+ .setMediaType(MediaTypes.JSON)
+ ).content();
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a POST request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/skip_onboarding_tutorial">Further information about this action online (including a response example)</a>
* @since 6.5
*/
diff --git a/sonar-ws/src/main/protobuf/ws-ce.proto b/sonar-ws/src/main/protobuf/ws-ce.proto
index dc18f7cb87e..5787a326e5e 100644
--- a/sonar-ws/src/main/protobuf/ws-ce.proto
+++ b/sonar-ws/src/main/protobuf/ws-ce.proto
@@ -92,6 +92,8 @@ message Task {
optional string branch = 21;
optional sonarqube.ws.commons.BranchType branchType = 22;
optional string errorType = 23;
+ optional string pullRequest = 24;
+ optional string pullRequestTitle = 25;
}
enum TaskStatus {
diff --git a/sonar-ws/src/main/protobuf/ws-commons.proto b/sonar-ws/src/main/protobuf/ws-commons.proto
index b5b0167e8d0..947e2487657 100644
--- a/sonar-ws/src/main/protobuf/ws-commons.proto
+++ b/sonar-ws/src/main/protobuf/ws-commons.proto
@@ -127,4 +127,5 @@ enum BranchType {
LONG = 1;
SHORT = 2;
+ PULL_REQUEST = 3;
}
diff --git a/sonar-ws/src/main/protobuf/ws-components.proto b/sonar-ws/src/main/protobuf/ws-components.proto
index 73059133649..a995eb42cbc 100644
--- a/sonar-ws/src/main/protobuf/ws-components.proto
+++ b/sonar-ws/src/main/protobuf/ws-components.proto
@@ -122,6 +122,7 @@ message Component {
optional string project = 17;
optional string branch = 18;
optional string version = 19;
+ optional string pullRequest = 20;
message Tags {
repeated string tags = 1;
diff --git a/sonar-ws/src/main/protobuf/ws-duplications.proto b/sonar-ws/src/main/protobuf/ws-duplications.proto
index 6eeb5f29a32..98cbe46885c 100644
--- a/sonar-ws/src/main/protobuf/ws-duplications.proto
+++ b/sonar-ws/src/main/protobuf/ws-duplications.proto
@@ -52,4 +52,5 @@ message File {
string subProjectUuid = 8;
string subProjectName = 9;
string branch = 10;
+ string pullRequest = 11;
}
diff --git a/sonar-ws/src/main/protobuf/ws-issues.proto b/sonar-ws/src/main/protobuf/ws-issues.proto
index c869c9c1ff3..125f6e4c216 100644
--- a/sonar-ws/src/main/protobuf/ws-issues.proto
+++ b/sonar-ws/src/main/protobuf/ws-issues.proto
@@ -156,6 +156,7 @@ message Issue {
optional string organization = 29;
optional string branch = 30;
+ optional string pullRequest = 32;
}
message Transitions {
@@ -234,6 +235,7 @@ message Component {
optional int64 unusedProjectId = 9;
optional int64 unusedSubProjectId = 10;
optional string branch = 12;
+ optional string pullRequest = 13;
}
// Response of GET api/issues/changelog
diff --git a/sonar-ws/src/main/protobuf/ws-measures.proto b/sonar-ws/src/main/protobuf/ws-measures.proto
index 36cd4ab6174..c861426c3ea 100644
--- a/sonar-ws/src/main/protobuf/ws-measures.proto
+++ b/sonar-ws/src/main/protobuf/ws-measures.proto
@@ -76,6 +76,7 @@ message Component {
optional string language = 10;
repeated Measure measures = 11;
optional string branch = 12;
+ optional string pullRequest = 13;
}
message Period {
diff --git a/sonar-ws/src/main/protobuf/ws-projectbranches.proto b/sonar-ws/src/main/protobuf/ws-projectbranches.proto
index 55d8e4032ce..e75439ab06e 100644
--- a/sonar-ws/src/main/protobuf/ws-projectbranches.proto
+++ b/sonar-ws/src/main/protobuf/ws-projectbranches.proto
@@ -45,16 +45,15 @@ message Branch {
optional Status status = 5;
optional bool isOrphan = 6;
optional string analysisDate = 7;
+}
- message Status {
- // Quality gate status is only present for long living branch
- optional string qualityGateStatus = 1;
- // Merge bugs, vulnerabilities and codeSmell are only present for short living branch
- optional int64 bugs = 2;
- optional int64 vulnerabilities = 3;
- optional int64 codeSmells = 4;
- }
-
+message Status {
+ // Quality gate status is only present for long living branch
+ optional string qualityGateStatus = 1;
+ // Merge bugs, vulnerabilities and codeSmell are only present for short living branch
+ optional int64 bugs = 2;
+ optional int64 vulnerabilities = 3;
+ optional int64 codeSmells = 4;
}
diff --git a/sonar-ws/src/main/protobuf/ws-projectpullrequests.proto b/sonar-ws/src/main/protobuf/ws-projectpullrequests.proto
new file mode 100644
index 00000000000..e6bc0300953
--- /dev/null
+++ b/sonar-ws/src/main/protobuf/ws-projectpullrequests.proto
@@ -0,0 +1,49 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 3 of the License, or (at your option) any later version.
+//
+// SonarQube is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program; if not, write to the Free Software Foundation,
+// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+syntax = "proto2";
+
+package sonarqube.ws.projectpullrequest;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "ProjectPullRequests";
+option optimize_for = SPEED;
+
+import "ws-commons.proto";
+
+// WS api/project_pull_requests/list
+message ListWsResponse {
+ repeated PullRequest pullRequests = 1;
+}
+
+message PullRequest {
+ optional string key = 1;
+ optional string title = 2;
+ optional string branch = 3;
+ optional string base = 4;
+ optional Status status = 5;
+ optional bool isOrphan = 6;
+ optional string analysisDate = 7;
+ optional string url = 8;
+}
+
+message Status {
+ optional int64 bugs = 2;
+ optional int64 vulnerabilities = 3;
+ optional int64 codeSmells = 4;
+}
diff --git a/sonar-ws/src/main/protobuf/ws-tests.proto b/sonar-ws/src/main/protobuf/ws-tests.proto
index 74865970ca6..6d389e735bd 100644
--- a/sonar-ws/src/main/protobuf/ws-tests.proto
+++ b/sonar-ws/src/main/protobuf/ws-tests.proto
@@ -42,6 +42,7 @@ message CoveredFilesResponse {
optional string longName = 3;
optional int32 coveredLines = 4;
optional string branch = 5;
+ optional string pullRequest = 6;
}
}
@@ -58,6 +59,7 @@ message Test {
optional string message = 9;
optional string stacktrace = 10;
optional string fileBranch = 11;
+ optional string filePullRequest = 12;
}
enum TestStatus {