From 94831fc10aa9612ba04ee47b5adc706bdd79bed5 Mon Sep 17 00:00:00 2001 From: David Tanner Date: Tue, 19 Aug 2014 13:22:25 -0600 Subject: [PATCH] Remove getPath() When getting the path and providing an enterprise url for the apiUrl, the /api/v3 portion gets duplicated. Since they will be combined on line 231 of GitHub.java there is no point just grabbing the path. See https://github.com/janinko/ghprb/issues/178, and https://issues.jenkins-ci.org/browse/JENKINS-24145?focusedCommentId=208270#comment-208270 --- src/main/java/org/kohsuke/github/GHPullRequest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/kohsuke/github/GHPullRequest.java b/src/main/java/org/kohsuke/github/GHPullRequest.java index 75c54611f..1dbc42555 100644 --- a/src/main/java/org/kohsuke/github/GHPullRequest.java +++ b/src/main/java/org/kohsuke/github/GHPullRequest.java @@ -196,7 +196,7 @@ public class GHPullRequest extends GHIssue { return new PagedIterable() { public PagedIterator iterator() { return new PagedIterator(root.retrieve().asIterator( - String.format("%s/commits", getApiURL().getPath()), + String.format("%s/commits", getApiURL()), GHPullRequestCommitDetail[].class)) { @Override protected void wrapUp(GHPullRequestCommitDetail[] page) {