Skip to content
Open
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
10 changes: 10 additions & 0 deletions src/main/java/org/kohsuke/github/GHPullRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,16 @@ public boolean isMerged() throws IOException {
return merged;
}

/**
* Since a GHPullRequest is always a pull request, this method always returns true.
*
* @return true
*/
@Override
public boolean isPullRequest() {
return true;
}

/**
* Retrieves all the commits associated to this pull request.
*
Expand Down
1 change: 1 addition & 0 deletions src/test/java/org/kohsuke/github/GHEventPayloadTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,7 @@ public void pull_request() throws Exception {
assertThat(event.getPullRequest().getBase().getLabel(), is("baxterthehacker:main"));
assertThat(event.getPullRequest().getBase().getSha(), is("9049f1265b7d61be4a8904a9a27120d2064dab3b"));
assertThat(event.getPullRequest().isMerged(), is(false));
assertThat(event.getPullRequest().isPullRequest(), is(true));
assertThat(event.getPullRequest().getMergeable(), nullValue());
assertThat(event.getPullRequest().getMergeableState(), is("unknown"));
assertThat(event.getPullRequest().getMergedBy(), nullValue());
Expand Down
Loading