mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-05 08:21:21 +00:00
Add support for draft pull requests
See https://developer.github.com/v3/pulls/#input and https://help.github.com/en/articles/about-pull-requests#draft-pull-requests Note that it requires the use of a github api preview: https://developer.github.com/v3/previews/#draft-pull-requests
This commit is contained in:
@@ -52,7 +52,7 @@ public class GHPullRequest extends GHIssue {
|
||||
// details that are only available when obtained from ID
|
||||
private GHUser merged_by;
|
||||
private int review_comments, additions, commits;
|
||||
private boolean merged, maintainer_can_modify;
|
||||
private boolean merged, maintainer_can_modify, draft;
|
||||
private Boolean mergeable;
|
||||
private int deletions;
|
||||
private String mergeable_state;
|
||||
@@ -187,6 +187,11 @@ public class GHPullRequest extends GHIssue {
|
||||
return maintainer_can_modify;
|
||||
}
|
||||
|
||||
public boolean isDraft() throws IOException {
|
||||
populate();
|
||||
return draft;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this PR mergeable?
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user