Skip to content
Merged
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
9 changes: 9 additions & 0 deletions src/main/java/org/kohsuke/github/GHPullRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ public class GHPullRequest extends GHIssue {
private int changed_files;
private String merge_commit_sha;

// pull request reviewers
private GHUser[] requested_reviewers;

/**
* GitHub doesn't return some properties of {@link GHIssue} when requesting the GET on the 'pulls' API
* route as opposed to 'issues' API route. This flag remembers whether we made the GET call on the 'issues' route
Expand All @@ -76,6 +79,7 @@ GHPullRequest wrapUp(GitHub root) {
if (base != null) base.wrapUp(root);
if (head != null) head.wrapUp(root);
if (merged_by != null) merged_by.wrapUp(root);
if (requested_reviewers != null) GHUser.wrap(requested_reviewers, root);
return this;
}

Expand Down Expand Up @@ -219,6 +223,11 @@ public String getMergeCommitSha() throws IOException {
return merge_commit_sha;
}

public GHUser[] getRequestedReviewers() throws IOException {
populate();
return requested_reviewers;
}

/**
* Fully populate the data by retrieving missing data.
*
Expand Down