aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre <pierre.guillot@sonarsource.com>2020-11-13 16:57:23 +0100
committersonartech <sonartech@sonarsource.com>2020-11-25 20:06:26 +0000
commit83e8eed514676c22ca9aeb6fad1e87908c95459c (patch)
tree1e255229dbc3177e542ec49f1249fb525316b8a4
parent942a20cb4e5e3c254a08a8c56b228af1d7a5f744 (diff)
downloadsonarqube-83e8eed514676c22ca9aeb6fad1e87908c95459c.tar.gz
sonarqube-83e8eed514676c22ca9aeb6fad1e87908c95459c.zip
SONAR-14133 add parameters to set_azure_binding
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java2
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateAzureRequest.java25
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/DeleteRequest.java13
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/SetAzureBindingRequest.java27
4 files changed, 42 insertions, 25 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java
index cd506f16be4..0c3319755a3 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java
@@ -196,6 +196,8 @@ public class AlmSettingsService extends BaseService {
new PostRequest(path("set_azure_binding"))
.setParam("almSetting", request.getAlmSetting())
.setParam("project", request.getProject())
+ .setParam("projectName", request.getProjectName())
+ .setParam("repositoryName", request.getRepositoryName())
.setMediaType(MediaTypes.JSON)).content();
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateAzureRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateAzureRequest.java
index b076e0458c3..28f6c7ec391 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateAzureRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateAzureRequest.java
@@ -33,38 +33,29 @@ public class CreateAzureRequest {
private String personalAccessToken;
private String url;
- /**
- * This is a mandatory parameter.
- */
public CreateAzureRequest setKey(String key) {
this.key = key;
return this;
}
- public String getKey() {
- return key;
- }
-
- /**
- * This is a mandatory parameter.
- */
public CreateAzureRequest setPersonalAccessToken(String personalAccessToken) {
this.personalAccessToken = personalAccessToken;
return this;
}
- public String getPersonalAccessToken() {
- return personalAccessToken;
- }
-
- /**
- * This is a mandatory parameter.
- */
public CreateAzureRequest setUrl(String url) {
this.url = url;
return this;
}
+ public String getKey() {
+ return key;
+ }
+
+ public String getPersonalAccessToken() {
+ return personalAccessToken;
+ }
+
public String getUrl() {
return url;
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/DeleteRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/DeleteRequest.java
index c9f6df6f64a..65a5b79ddb9 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/DeleteRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/DeleteRequest.java
@@ -29,17 +29,14 @@ import javax.annotation.Generated;
@Generated("sonar-ws-generator")
public class DeleteRequest {
- private String key;
+ private static String key;
+
+ public DeleteRequest(String key) {
+ this.key = key;
+ }
public String getKey() {
return key;
}
- /**
- * This is a mandatory parameter.
- */
- public DeleteRequest setKey(String key) {
- this.key = key;
- return this;
- }
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/SetAzureBindingRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/SetAzureBindingRequest.java
index 2958d2d1b35..9dee34d017e 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/SetAzureBindingRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/SetAzureBindingRequest.java
@@ -31,6 +31,8 @@ public class SetAzureBindingRequest {
private String almSetting;
private String project;
+ private String repositoryName;
+ private String projectName;
/**
* This is a mandatory parameter.
@@ -56,4 +58,29 @@ public class SetAzureBindingRequest {
return project;
}
+ public String getRepositoryName() {
+ return repositoryName;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ * @return
+ */
+ public SetAzureBindingRequest setRepositoryName(String repositoryName) {
+ this.repositoryName = repositoryName;
+ return this;
+ }
+
+ public String getProjectName() {
+ return projectName;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ * @return
+ */
+ public SetAzureBindingRequest setProjectName(String projectName) {
+ this.projectName = projectName;
+ return this;
+ }
}