public class GHPullRequest extends GHIssue
GHRepository.getPullRequest(int)
Modifier and Type | Class and Description |
---|---|
static class |
GHPullRequest.MergeMethod |
GHIssue.Label, GHIssue.PullRequest
assignee, assignees, body, closed_at, closed_by, comments, html_url, labels, locked, milestone, number, pull_request, state, title, user
created_at, id, responseHeaderFields, updated_at, url
Constructor and Description |
---|
GHPullRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
canMaintainerModify() |
GHPullRequestReviewBuilder |
createReview() |
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) |
int |
getAdditions() |
protected String |
getApiRoute() |
GHCommitPointer |
getBase()
This points to where the change should be pulled into,
but I'm not really sure what exactly it means.
|
int |
getChangedFiles() |
GHUser |
getClosedBy()
Reports who has closed the issue.
|
int |
getCommits() |
int |
getDeletions() |
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() |
Boolean |
getMergeable()
Is this PR mergeable?
|
String |
getMergeableState() |
String |
getMergeCommitSha()
See GitHub blog post
|
Date |
getMergedAt() |
GHUser |
getMergedBy() |
URL |
getPatchUrl()
The URL of the patch file.
|
GHIssue.PullRequest |
getPullRequest()
Returns non-null if this issue is a shadow of a pull request.
|
int |
getReviewComments() |
boolean |
isMerged() |
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.
|
addAssignees, addAssignees, assignTo, close, comment, createReaction, getApiURL, getAssignee, getAssignees, getBody, getClosedAt, getComments, getCommentsCount, getHtmlUrl, getIssuesApiRoute, getMilestone, getNumber, getRepository, getState, getTitle, getUser, isLocked, isPullRequest, listComments, listReactions, lock, removeAssignees, removeAssignees, reopen, setAssignees, setAssignees, setBody, setLabels, setMilestone, setTitle, unlock
getCreatedAt, getId, getResponseHeaderFields, getUpdatedAt, getUrl, toString
protected String getApiRoute()
getApiRoute
in class GHIssue
public URL getPatchUrl()
public URL getIssueUrl()
public GHCommitPointer getBase()
public GHCommitPointer getHead()
@Deprecated public Date getIssueUpdatedAt() throws IOException
IOException
public URL getDiffUrl()
public Date getMergedAt()
public Collection<GHLabel> getLabels() throws IOException
getLabels
in class GHIssue
IOException
public GHUser getClosedBy()
GHIssue
Note 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 GHIssue
public GHIssue.PullRequest getPullRequest()
GHIssue
getPullRequest
in class GHIssue
public GHUser getMergedBy() throws IOException
IOException
public int getReviewComments() throws IOException
IOException
public int getAdditions() throws IOException
IOException
public int getCommits() throws IOException
IOException
public boolean isMerged() throws IOException
IOException
public boolean canMaintainerModify() throws IOException
IOException
public Boolean getMergeable() throws IOException
IOException
public int getDeletions() throws IOException
IOException
public String getMergeableState() throws IOException
IOException
public int getChangedFiles() throws IOException
IOException
public String getMergeCommitSha() throws IOException
IOException
public void refresh() throws IOException
IOException
public PagedIterable<GHPullRequestFileDetail> listFiles()
public PagedIterable<GHPullRequestReview> listReviews()
public PagedIterable<GHPullRequestReviewComment> listReviewComments() throws IOException
IOException
public PagedIterable<GHPullRequestCommitDetail> listCommits()
public GHPullRequestReview createReview(String body, @CheckForNull GHPullRequestReviewState event, GHPullRequestReviewComment... comments) throws IOException
createReview()
IOException
public GHPullRequestReview createReview(String body, @CheckForNull GHPullRequestReviewState event, List<GHPullRequestReviewComment> comments) throws IOException
createReview()
IOException
public GHPullRequestReviewBuilder createReview()
public GHPullRequestReviewComment createReviewComment(String body, String sha, String path, int position) throws IOException
IOException
public void merge(String msg) throws IOException
msg
- Commit message. If null, the default one will be used.IOException
public void merge(String msg, String sha) throws IOException
msg
- Commit message. If null, the default one will be used.sha
- SHA that pull request head must match to allow merge.IOException
public void merge(String msg, String sha, GHPullRequest.MergeMethod method) throws IOException
msg
- Commit message. If null, the default one will be used.method
- SHA that pull request head must match to allow merge.IOException
Copyright © 2018. All rights reserved.