public class GHPullRequest extends GHIssue implements Refreshable
GHRepository#getPullRequest(int)| Modifier and Type | Class and Description |
|---|---|
static class |
GHPullRequest.MergeMethod
The enum MergeMethod.
|
GHIssue.Label, GHIssue.PullRequestassignee, assignees, body, closed_at, closed_by, comments, html_url, labels, locked, milestone, number, pull_request, state, title, usercreated_at, id, responseHeaderFields, updated_at, url| Constructor and Description |
|---|
GHPullRequest() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canMaintainerModify()
Can maintainer modify boolean.
|
GHPullRequestReviewBuilder |
createReview()
Create review gh pull request review builder.
|
GHPullRequestReview |
createReview(String body,
GHPullRequestReviewState event,
GHPullRequestReviewComment... comments)
Deprecated.
Use
createReview() |
GHPullRequestReview |
createReview(String body,
GHPullRequestReviewState event,
List<GHPullRequestReviewComment> comments)
Deprecated.
Use
createReview() |
GHPullRequestReviewComment |
createReviewComment(String body,
String sha,
String path,
int position)
Create review comment gh pull request review comment.
|
int |
getAdditions()
Gets additions.
|
protected String |
getApiRoute()
Gets api route.
|
GHCommitPointer |
getBase()
This points to where the change should be pulled into, but I'm not really sure what exactly it means.
|
int |
getChangedFiles()
Gets changed files.
|
GHUser |
getClosedBy()
Reports who has closed the issue.
|
int |
getCommits()
Gets commits.
|
int |
getDeletions()
Gets deletions.
|
URL |
getDiffUrl()
The diff file, like https://github.com/jenkinsci/jenkins/pull/100.diff
|
GHCommitPointer |
getHead()
The change that should be pulled.
|
Date |
getIssueUpdatedAt()
Deprecated.
|
URL |
getIssueUrl()
The URL of the patch file.
|
Collection<GHLabel> |
getLabels()
Gets labels.
|
Boolean |
getMergeable()
Is this PR mergeable?
|
String |
getMergeableState()
Gets mergeable state.
|
String |
getMergeCommitSha()
See GitHub blog post
|
Date |
getMergedAt()
Gets merged at.
|
GHUser |
getMergedBy()
Gets merged by.
|
URL |
getPatchUrl()
The URL of the patch file.
|
GHIssue.PullRequest |
getPullRequest()
Returns non-null if this issue is a shadow of a pull request.
|
List<GHUser> |
getRequestedReviewers()
Gets requested reviewers.
|
List<GHTeam> |
getRequestedTeams()
Gets requested teams.
|
int |
getReviewComments()
Gets review comments.
|
boolean |
isDraft()
Is draft boolean.
|
boolean |
isMerged()
Is merged boolean.
|
PagedIterable<GHPullRequestCommitDetail> |
listCommits()
Retrieves all the commits associated to this pull request.
|
PagedIterable<GHPullRequestFileDetail> |
listFiles()
Retrieves all the files associated to this pull request.
|
PagedIterable<GHPullRequestReviewComment> |
listReviewComments()
Obtains all the review comments associated with this pull request.
|
PagedIterable<GHPullRequestReview> |
listReviews()
Retrieves all the reviews associated to this pull request.
|
void |
merge(String msg)
Merge this pull request.
|
void |
merge(String msg,
String sha)
Merge this pull request.
|
void |
merge(String msg,
String sha,
GHPullRequest.MergeMethod method)
Merge this pull request, using the specified merge method.
|
void |
refresh()
Repopulates this object.
|
void |
requestReviewers(List<GHUser> reviewers)
Request reviewers.
|
void |
requestTeamReviewers(List<GHTeam> teams)
Request team reviewers.
|
addAssignees, addAssignees, addLabels, addLabels, addLabels, assignTo, close, comment, createReaction, getApiURL, getAssignee, getAssignees, getBody, getClosedAt, getComments, getCommentsCount, getHtmlUrl, getIssuesApiRoute, getLogins, getMilestone, getNumber, getRepository, getState, getTitle, getUser, isLocked, isPullRequest, listComments, listEvents, listReactions, lock, removeAssignees, removeAssignees, removeLabels, removeLabels, removeLabels, reopen, setAssignees, setAssignees, setBody, setLabels, setMilestone, setTitle, unlockgetCreatedAt, getId, getResponseHeaderFields, getUpdatedAt, getUrl, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitrefreshprotected String getApiRoute()
GHIssuegetApiRoute in class GHIssuepublic URL getPatchUrl()
public URL getIssueUrl()
public GHCommitPointer getBase()
public GHCommitPointer getHead()
@Deprecated public Date getIssueUpdatedAt() throws IOException
IOException - the io exceptionpublic URL getDiffUrl()
public Date getMergedAt()
public Collection<GHLabel> getLabels() throws IOException
GHIssuegetLabels in class GHIssueIOException - the io exceptionpublic GHUser getClosedBy()
GHIssueNote that GitHub doesn't always seem to report this information even for an issue that's already closed. See https://github.com/kohsuke/github-api/issues/60.
getClosedBy in class GHIssuepublic GHIssue.PullRequest getPullRequest()
GHIssuegetPullRequest in class GHIssuepublic GHUser getMergedBy() throws IOException
IOException - the io exceptionpublic int getReviewComments()
throws IOException
IOException - the io exceptionpublic int getAdditions()
throws IOException
IOException - the io exceptionpublic int getCommits()
throws IOException
IOException - the io exceptionpublic boolean isMerged()
throws IOException
IOException - the io exceptionpublic boolean canMaintainerModify()
throws IOException
IOException - the io exceptionpublic boolean isDraft()
throws IOException
IOException - the io exceptionpublic Boolean getMergeable() throws IOException
IOException - the io exceptionpublic int getDeletions()
throws IOException
IOException - the io exceptionpublic String getMergeableState() throws IOException
IOException - the io exceptionpublic int getChangedFiles()
throws IOException
IOException - the io exceptionpublic String getMergeCommitSha() throws IOException
IOException - the io exceptionpublic List<GHUser> getRequestedReviewers() throws IOException
IOException - the io exceptionpublic List<GHTeam> getRequestedTeams() throws IOException
IOException - the io exceptionpublic void refresh()
throws IOException
refresh in interface RefreshableIOException - the io exceptionpublic PagedIterable<GHPullRequestFileDetail> listFiles()
public PagedIterable<GHPullRequestReview> listReviews()
public PagedIterable<GHPullRequestReviewComment> listReviewComments() throws IOException
IOException - the io exceptionpublic PagedIterable<GHPullRequestCommitDetail> listCommits()
public GHPullRequestReview createReview(String body, @CheckForNull GHPullRequestReviewState event, GHPullRequestReviewComment... comments) throws IOException
createReview()body - the bodyevent - the eventcomments - the commentsIOException - the io exceptionpublic GHPullRequestReview createReview(String body, @CheckForNull GHPullRequestReviewState event, List<GHPullRequestReviewComment> comments) throws IOException
createReview()body - the bodyevent - the eventcomments - the commentsIOException - the io exceptionpublic GHPullRequestReviewBuilder createReview()
public GHPullRequestReviewComment createReviewComment(String body, String sha, String path, int position) throws IOException
body - the bodysha - the shapath - the pathposition - the positionIOException - the io exceptionpublic void requestReviewers(List<GHUser> reviewers) throws IOException
reviewers - the reviewersIOException - the io exceptionpublic void requestTeamReviewers(List<GHTeam> teams) throws IOException
teams - the teamsIOException - the io exceptionpublic void merge(String msg) throws IOException
The equivalent of the big green "Merge pull request" button.
msg - Commit message. If null, the default one will be used.IOException - the io exceptionpublic void merge(String msg, String sha) throws IOException
The equivalent of the big green "Merge pull request" button.
msg - Commit message. If null, the default one will be used.sha - SHA that pull request head must match to allow merge.IOException - the io exceptionpublic void merge(String msg, String sha, GHPullRequest.MergeMethod method) throws IOException
The equivalent of the big green "Merge pull request" button.
msg - Commit message. If null, the default one will be used.sha - the shamethod - SHA that pull request head must match to allow merge.IOException - the io exceptionCopyright © 2020. All rights reserved.