]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-13742 The payload should return GitHub API's 'html_url' value rather than ...
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Thu, 12 Aug 2021 09:26:39 +0000 (11:26 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 13 Aug 2021 20:03:53 +0000 (20:03 +0000)
server/sonar-alm-client/src/main/java/org/sonar/alm/client/github/GithubBinding.java
server/sonar-alm-client/src/test/java/org/sonar/alm/client/github/GithubApplicationClientImplTest.java

index ce6e207bf707afb1c2799555033eafbf1a06b2b7..fc2c2a77f718770c6c33571d08e162003f049f4c 100644 (file)
@@ -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);
     }
   }
 }
index 3b823daab6a10100cf394d813ea7db68b205036f..56cf7a30879595da9a2920cf9997e46979cc6a31 100644 (file)
@@ -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() {