Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/java/org/kohsuke/github/GHPullRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,10 @@ public void refresh() throws IOException {
return; // cannot populate, will have to live with what we have
}

URL url = getUrl();
if (url != null) {
root().createRequest().withPreview(SHADOW_CAT).setRawUrlPath(url.toString()).fetchInto(this).wrapUp(owner);
}
root().createRequest()
.withPreview(SHADOW_CAT)
.withUrlPath("/repos/" + owner.getOwnerName() + "/" + getRepository().getName() + "/pulls/" + number)
.fetchInto(this);
Comment on lines +413 to +416
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar to #25 so will try and fix/test same time

}

/**
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/org/kohsuke/github/GitHubPageIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,13 @@ private GitHubRequest findNextURL(GitHubRequest nextRequest, GitHubResponse<T> n
// found the next page. This should look something like
// <https://api.github.com/repos?page=3&per_page=100>; rel="next"
int idx = token.indexOf('>');
result = nextRequest.toBuilder().setRawUrlPath(token.substring(1, idx)).build();
String nextUrl = token.substring(1, idx);

// Adjust the base URL to match the client’s configuration
nextUrl = nextUrl.replace(GitHubClient.GITHUB_URL, client.getApiUrl()); // client.getApiUrl() ==
// root()

result = nextRequest.toBuilder().setRawUrlPath(nextUrl).build();
break;
}
}
Expand Down
Loading