Skip to content

Commit

Permalink
Merge pull request #946 from seregamorph/feature/pull-request-review-…
Browse files Browse the repository at this point in the history
…html-url

pullRequestReview.review.htmlUrl
  • Loading branch information
bitwiseman authored Sep 25, 2020
2 parents 07a392c + 0894c80 commit f1ca0b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/kohsuke/github/GHPullRequestReview.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -102,7 +103,7 @@ public GHPullRequestReviewState getState() {

@Override
public URL getHtmlUrl() {
return null;
return GitHubClient.parseURL(html_url);
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/org/kohsuke/github/GHEventPayloadTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit f1ca0b5

Please sign in to comment.