From 0894c8007c12aa3ee6a72f4b4409af45683c03d4 Mon Sep 17 00:00:00 2001 From: seregamorph Date: Fri, 25 Sep 2020 13:24:35 +0300 Subject: [PATCH] pullRequestReview.review.htmlUrl --- src/main/java/org/kohsuke/github/GHPullRequestReview.java | 3 ++- src/test/java/org/kohsuke/github/GHEventPayloadTest.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) 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 b618635d7b..3fb3bb2ca2 100644 --- a/src/test/java/org/kohsuke/github/GHEventPayloadTest.java +++ b/src/test/java/org/kohsuke/github/GHEventPayloadTest.java @@ -216,6 +216,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"));