diff options
author | Wojtek Wajerowicz <115081248+wojciech-wajerowicz-sonarsource@users.noreply.github.com> | 2023-11-20 10:58:15 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-11-20 20:02:38 +0000 |
commit | 0c7fd2fe339f3969a67553b333ce4a5e67cf9c2d (patch) | |
tree | b89b3878c077af833dd5a3f2c23e50cf71c4f1db /sonar-ws/src/main | |
parent | 6f37b467c20c37fb83fc4cd388b333f121e05c64 (diff) | |
download | sonarqube-0c7fd2fe339f3969a67553b333ce4a5e67cf9c2d.tar.gz sonarqube-0c7fd2fe339f3969a67553b333ce4a5e67cf9c2d.zip |
SONAR-21015 Move GitHub permission mapping endpoints to dop-translation domain
Diffstat (limited to 'sonar-ws/src/main')
-rw-r--r-- | sonar-ws/src/main/java/org/sonarqube/ws/client/github/provisioning/permissions/GithubPermissionsService.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/github/provisioning/permissions/GithubPermissionsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/github/provisioning/permissions/GithubPermissionsService.java index a68c47f9f14..e7d2e8d7576 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/github/provisioning/permissions/GithubPermissionsService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/github/provisioning/permissions/GithubPermissionsService.java @@ -33,16 +33,12 @@ public class GithubPermissionsService extends BaseService { } public void addPermissionMapping(AddGithubPermissionMappingRequest addGithubPermissionMappingRequest) { - try (WsResponse response = callEndpoint(addGithubPermissionMappingRequest)) { - if (!response.isSuccessful()) { - throw new IllegalStateException("Failed to add github permission mapping, http error code: " + response.code()); - } - } + callEndpoint(addGithubPermissionMappingRequest).close(); } private WsResponse callEndpoint(AddGithubPermissionMappingRequest addGithubPermissionMappingRequest) { return call( - new PostRequest(path("github-permission-mappings")) + new PostRequest(path("dop-translation/github-permission-mappings")) .setBody(new Gson().toJson(addGithubPermissionMappingRequest)) .setMediaType(MediaTypes.JSON)); } |