Skip to content

Commit 7da9fad

Browse files
update to support breaking change in github-api (#772)
* update to support breaking change in github-api The method gitHttpTransportUrl has been removed from github-api (see commit hub4j/github-api@944d92b?diff=split). And because of that the ghprb plugin is broken. This change correct the issue. * Update pom.xml * update deps * try to correct maven enforcer plugin failures * update deps * retriggering build * correct unit tests * update style check to remove windows specific erros Co-authored-by: Lajugie, Julien <[email protected]>
1 parent 96ada00 commit 7da9fad

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

checkstyle.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@
4343

4444
<!-- Checks whether files end with a new line. -->
4545
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
46-
<module name="NewlineAtEndOfFile"/>
46+
<module name="NewlineAtEndOfFile">
47+
<property name="lineSeparator" value="lf" />
48+
</module>
4749

4850
<!-- Checks that property files contain the same keys. -->
4951
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
<dependency>
137137
<groupId>org.jenkins-ci.plugins</groupId>
138138
<artifactId>github-api</artifactId>
139-
<version>1.90</version>
139+
<version>1.92</version>
140140
</dependency>
141141
<dependency>
142142
<groupId>org.jenkins-ci.plugins</groupId>

src/main/java/org/jenkinsci/plugins/ghprb/GhprbPullRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ public String getAuthorRepoGitUrl() {
719719
String authorRepoGitUrl = "";
720720

721721
if (prHead != null && prHead.getRepository() != null) {
722-
authorRepoGitUrl = prHead.getRepository().gitHttpTransportUrl();
722+
authorRepoGitUrl = prHead.getRepository().getHttpTransportUrl();
723723
}
724724
return authorRepoGitUrl;
725725
}

src/test/java/org/jenkinsci/plugins/ghprb/GhprbPullRequestTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public void authorRepoGitUrlShouldBeSetWhenRepository() throws Exception {
218218
// GIVEN
219219
String expectedAuthorRepoGitUrl = "https://github.com/jenkinsci/ghprb-plugin";
220220
GHRepository repository = mock(GHRepository.class);
221-
given(repository.gitHttpTransportUrl()).willReturn(expectedAuthorRepoGitUrl);
221+
given(repository.getHttpTransportUrl()).willReturn(expectedAuthorRepoGitUrl);
222222

223223
given(head.getRepository()).willReturn(repository);
224224

0 commit comments

Comments
 (0)