Skip to content

Commit a6f3e7d

Browse files
committed
Merge pull request #464
2 parents 8e85bf8 + 9345d3b commit a6f3e7d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/org/kohsuke/github/GHPullRequest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.net.URL;
2929
import java.util.Arrays;
3030
import java.util.Collection;
31+
import java.util.Collections;
3132
import java.util.Date;
3233
import java.util.List;
3334

@@ -58,6 +59,9 @@ public class GHPullRequest extends GHIssue {
5859
private int changed_files;
5960
private String merge_commit_sha;
6061

62+
// pull request reviewers
63+
private GHUser[] requested_reviewers;
64+
6165
/**
6266
* GitHub doesn't return some properties of {@link GHIssue} when requesting the GET on the 'pulls' API
6367
* route as opposed to 'issues' API route. This flag remembers whether we made the GET call on the 'issues' route
@@ -76,6 +80,7 @@ GHPullRequest wrapUp(GitHub root) {
7680
if (base != null) base.wrapUp(root);
7781
if (head != null) head.wrapUp(root);
7882
if (merged_by != null) merged_by.wrapUp(root);
83+
if (requested_reviewers != null) GHUser.wrap(requested_reviewers, root);
7984
return this;
8085
}
8186

@@ -219,6 +224,11 @@ public String getMergeCommitSha() throws IOException {
219224
return merge_commit_sha;
220225
}
221226

227+
public List<GHUser> getRequestedReviewers() throws IOException {
228+
populate();
229+
return Collections.unmodifiableList(Arrays.asList(requested_reviewers));
230+
}
231+
222232
/**
223233
* Fully populate the data by retrieving missing data.
224234
*

0 commit comments

Comments
 (0)