aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2021-08-12 11:26:39 +0200
committersonartech <sonartech@sonarsource.com>2021-08-13 20:03:53 +0000
commitae33251d693b3c52a8952cfe476411238ff5c888 (patch)
tree1b56ac17d67fbe1fef6a8ad34a8a795f32276c54
parent47e63855d5b17ee17837e45a2ab77aa6b37e0b7d (diff)
downloadsonarqube-ae33251d693b3c52a8952cfe476411238ff5c888.tar.gz
sonarqube-ae33251d693b3c52a8952cfe476411238ff5c888.zip
SONAR-13742 The payload should return GitHub API's 'html_url' value rather than 'html'
-rw-r--r--server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/GithubBinding.java6
-rw-r--r--server/sonar-alm-client/src/test/java/org/sonar/alm/client/github/GithubApplicationClientImplTest.java2
2 files changed, 4 insertions, 4 deletions
diff --git a/server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/GithubBinding.java b/server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/GithubBinding.java
index ce6e207bf70..fc2c2a77f71 100644
--- a/server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/GithubBinding.java
+++ b/server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/GithubBinding.java
@@ -138,8 +138,8 @@ public class GithubBinding {
String fullName;
@SerializedName("private")
boolean isPrivate;
- @SerializedName("url")
- String url;
+ @SerializedName("html_url")
+ String htmlUrl;
@SerializedName("default_branch")
String defaultBranch;
@@ -151,7 +151,7 @@ public class GithubBinding {
public Repository toRepository() {
return new Repository(this.id, this.name, this.isPrivate, this.fullName,
- this.url, this.defaultBranch);
+ this.htmlUrl, this.defaultBranch);
}
}
}
diff --git a/server/sonar-alm-client/src/test/java/org/sonar/alm/client/github/GithubApplicationClientImplTest.java b/server/sonar-alm-client/src/test/java/org/sonar/alm/client/github/GithubApplicationClientImplTest.java
index 3b823daab6a..56cf7a30879 100644
--- a/server/sonar-alm-client/src/test/java/org/sonar/alm/client/github/GithubApplicationClientImplTest.java
+++ b/server/sonar-alm-client/src/test/java/org/sonar/alm/client/github/GithubApplicationClientImplTest.java
@@ -794,7 +794,7 @@ public class GithubApplicationClientImplTest {
.get()
.extracting(GithubApplicationClient.Repository::getId, GithubApplicationClient.Repository::getName, GithubApplicationClient.Repository::getFullName,
GithubApplicationClient.Repository::getUrl, GithubApplicationClient.Repository::isPrivate, GithubApplicationClient.Repository::getDefaultBranch)
- .containsOnly(1296269L, "Hello-World", "octocat/Hello-World", "https://github.sonarsource.com/api/v3/repos/octocat/Hello-World", false, "master");
+ .containsOnly(1296269L, "Hello-World", "octocat/Hello-World", "https://github.com/octocat/Hello-World", false, "master");
}
private AppToken mockAppToken() {