From 2d87c5aec277581732ac108682f83a8f48524ad8 Mon Sep 17 00:00:00 2001 From: Eric Giffon Date: Wed, 31 Jan 2024 15:10:12 +0100 Subject: [PATCH] SONAR-21268 Fixed issues can be null in PR decoration --- .../sonarqube/ws/client/projects/CreateRequest.java | 12 ++++++------ .../ws/client/projects/ProjectsService.java | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/CreateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/CreateRequest.java index a89760b4be5..c24bdcf58e3 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/CreateRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/CreateRequest.java @@ -30,21 +30,21 @@ import javax.annotation.Generated; @Generated("sonar-ws-generator") public class CreateRequest { - private String branch; + private String mainBranch; private String name; private String project; private String visibility; /** - * Example value: "branch-5.0" + * Example value: "master" */ - public CreateRequest setBranch(String branch) { - this.branch = branch; + public CreateRequest setMainBranch(String mainBranch) { + this.mainBranch = mainBranch; return this; } - public String getBranch() { - return branch; + public String getMainBranch() { + return mainBranch; } /** diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/ProjectsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/ProjectsService.java index 98c82c0a2c2..c63409ad03a 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/ProjectsService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/projects/ProjectsService.java @@ -71,7 +71,7 @@ public class ProjectsService extends BaseService { public CreateWsResponse create(CreateRequest request) { return call( new PostRequest(path("create")) - .setParam("branch", request.getBranch()) + .setParam("mainBranch", request.getMainBranch()) .setParam("name", request.getName()) .setParam("project", request.getProject()) .setParam("visibility", request.getVisibility()), -- 2.39.5