diff --git a/src/main/java/org/kohsuke/github/GHPullRequestReview.java b/src/main/java/org/kohsuke/github/GHPullRequestReview.java index 4248fb172b..0c9143c92b 100644 --- a/src/main/java/org/kohsuke/github/GHPullRequestReview.java +++ b/src/main/java/org/kohsuke/github/GHPullRequestReview.java @@ -46,6 +46,7 @@ public class GHPullRequestReview extends GHObject { private String commit_id; private GHPullRequestReviewState state; private String submitted_at; + private String html_url; GHPullRequestReview wrapUp(GHPullRequest owner) { this.owner = owner; @@ -102,7 +103,7 @@ public GHPullRequestReviewState getState() { @Override public URL getHtmlUrl() { - return null; + return GitHubClient.parseURL(html_url); } /** diff --git a/src/test/java/org/kohsuke/github/GHEventPayloadTest.java b/src/test/java/org/kohsuke/github/GHEventPayloadTest.java index 9c09e4e09d..9e572a19bd 100644 --- a/src/test/java/org/kohsuke/github/GHEventPayloadTest.java +++ b/src/test/java/org/kohsuke/github/GHEventPayloadTest.java @@ -255,6 +255,8 @@ public void pull_request_review() throws Exception { assertThat(event.getPullRequest().getNumber(), is(8)); assertThat(event.getPullRequest().getTitle(), is("Add a README description")); assertThat(event.getPullRequest().getBody(), is("Just a few more details")); + assertThat(event.getReview().getHtmlUrl(), + hasToString("https://github.com/baxterthehacker/public-repo/pull/8#pullrequestreview-2626884")); assertThat(event.getPullRequest().getUser().getLogin(), is("skalnik")); assertThat(event.getPullRequest().getHead().getUser().getLogin(), is("skalnik")); assertThat(event.getPullRequest().getHead().getRef(), is("patch-2"));