public class PullRequestService extends GitHubService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ISSUE |
static java.lang.String |
PR_BASE
PR_BASE
|
static java.lang.String |
PR_BODY
PR_BODY
|
static java.lang.String |
PR_HEAD
PR_HEAD
|
static java.lang.String |
PR_STATE
PR_STATE
|
static java.lang.String |
PR_TITLE
PR_TITLE
|
ACCEPT_FULL, ACCEPT_HTML, ACCEPT_PREVIEW_DRAX, ACCEPT_PREVIEW_IRONMAN, ACCEPT_PREVIEW_LOKI, ACCEPT_RAW, ACCEPT_TEXT, client| Constructor and Description |
|---|
PullRequestService()
Create pull request service
|
PullRequestService(GitHubClient client)
Create pull request service
|
| Modifier and Type | Method and Description |
|---|---|
PullRequest |
closePullRequest(IRepositoryIdProvider repository,
int number) |
CommitComment |
createComment(IRepositoryIdProvider repository,
int id,
CommitComment comment)
Create comment on given pull request
|
protected PagedRequest<PullRequest> |
createPagedRequest(IRepositoryIdProvider provider,
java.lang.String state,
java.lang.String head,
java.lang.String base,
int start,
int size)
Create paged request for fetching pull requests
|
PullRequest |
createPullRequest(IRepositoryIdProvider repository,
int issueId,
java.lang.String head,
java.lang.String base)
Create pull request by attaching branch information to an existing issue
|
PullRequest |
createPullRequest(IRepositoryIdProvider repository,
java.lang.String title,
java.lang.String body,
java.lang.String head,
java.lang.String base)
Create pull request
|
void |
deleteComment(IRepositoryIdProvider repository,
long commentId)
Delete commit comment with given id
|
CommitComment |
editComment(IRepositoryIdProvider repository,
CommitComment comment)
Edit pull request comment
|
PullRequest |
editPullRequest(IRepositoryIdProvider repository,
int number,
java.lang.String title,
java.lang.String body,
java.lang.String state,
java.lang.String base)
Edit pull request
|
CommitComment |
getComment(IRepositoryIdProvider repository,
long commentId)
Get commit comment with given id
|
java.util.List<CommitComment> |
getComments(IRepositoryIdProvider repository,
int id)
Get all comments on commits in given pull request
|
java.util.List<RepositoryCommit> |
getCommits(IRepositoryIdProvider repository,
int id)
Get all commits associated with given pull request id
|
java.util.List<CommitFile> |
getFiles(IRepositoryIdProvider repository,
int id)
Get all changed files associated with given pull request id
|
PullRequest |
getPullRequest(IRepositoryIdProvider repository,
int id)
Create request for single pull request
|
PullRequest |
getPullRequest(IRepositoryIdProvider repository,
java.lang.String state,
java.lang.String head,
java.lang.String base)
Create request for single pull request
|
java.util.List<PullRequest> |
getPullRequests(IRepositoryIdProvider repository,
java.lang.String state)
Get pull requests from repository matching state
|
boolean |
isMerged(IRepositoryIdProvider repository,
int id)
Is the given pull request id merged?
|
MergeStatus |
merge(IRepositoryIdProvider repository,
int number,
java.lang.String commitMessage)
Merge given pull request
|
PageIterator<CommitComment> |
pageComments(IRepositoryIdProvider repository,
int id)
Page pull request commit comments
|
PageIterator<CommitComment> |
pageComments(IRepositoryIdProvider repository,
int id,
int size)
Page pull request commit comments
|
PageIterator<CommitComment> |
pageComments(IRepositoryIdProvider repository,
int id,
int start,
int size)
Page pull request commit comments
|
PageIterator<PullRequest> |
pagePullRequests(IRepositoryIdProvider repository,
java.lang.String state,
java.lang.String head,
java.lang.String base)
Page pull requests with given state
|
PageIterator<PullRequest> |
pagePullRequests(IRepositoryIdProvider repository,
java.lang.String state,
java.lang.String head,
java.lang.String base,
int size)
Page pull requests with given state
|
PageIterator<PullRequest> |
pagePullRequests(IRepositoryIdProvider repository,
java.lang.String state,
java.lang.String head,
java.lang.String base,
int start,
int size)
Page pull requests with given state
|
CommitComment |
replyToComment(IRepositoryIdProvider repository,
int pullRequestId,
int commentId,
java.lang.String body)
Reply to given comment
|
check, createPagedRequest, createPagedRequest, createPageIterator, createRequest, getAll, getAll, getClient, getId, verifyRepositorypublic static final java.lang.String PR_TITLE
public static final java.lang.String PR_BODY
public static final java.lang.String PR_BASE
public static final java.lang.String PR_HEAD
public static final java.lang.String PR_STATE
public static final java.lang.String ISSUE
public PullRequestService()
public PullRequestService(GitHubClient client)
client - public PullRequest getPullRequest(IRepositoryIdProvider repository, int id) throws java.io.IOException
repository - id - java.io.IOExceptionpublic PullRequest getPullRequest(IRepositoryIdProvider repository, java.lang.String state, java.lang.String head, java.lang.String base) throws java.io.IOException
repository - state - head - base - java.io.IOExceptionprotected PagedRequest<PullRequest> createPagedRequest(IRepositoryIdProvider provider, java.lang.String state, java.lang.String head, java.lang.String base, int start, int size)
provider - state - start - size - public java.util.List<PullRequest> getPullRequests(IRepositoryIdProvider repository, java.lang.String state) throws java.io.IOException
repository - state - java.io.IOExceptionpublic PageIterator<PullRequest> pagePullRequests(IRepositoryIdProvider repository, java.lang.String state, java.lang.String head, java.lang.String base)
repository - state - public PageIterator<PullRequest> pagePullRequests(IRepositoryIdProvider repository, java.lang.String state, java.lang.String head, java.lang.String base, int size)
repository - state - size - public PageIterator<PullRequest> pagePullRequests(IRepositoryIdProvider repository, java.lang.String state, java.lang.String head, java.lang.String base, int start, int size)
repository - state - start - size - public PullRequest createPullRequest(IRepositoryIdProvider repository, java.lang.String title, java.lang.String body, java.lang.String head, java.lang.String base) throws java.io.IOException
repository - java.io.IOExceptionpublic PullRequest createPullRequest(IRepositoryIdProvider repository, int issueId, java.lang.String head, java.lang.String base) throws java.io.IOException
repository - issueId - head - base - java.io.IOExceptionpublic PullRequest editPullRequest(IRepositoryIdProvider repository, int number, java.lang.String title, java.lang.String body, java.lang.String state, java.lang.String base) throws java.io.IOException
repository - java.io.IOExceptionpublic PullRequest closePullRequest(IRepositoryIdProvider repository, int number) throws java.io.IOException
java.io.IOExceptionpublic java.util.List<RepositoryCommit> getCommits(IRepositoryIdProvider repository, int id) throws java.io.IOException
repository - id - java.io.IOExceptionpublic java.util.List<CommitFile> getFiles(IRepositoryIdProvider repository, int id) throws java.io.IOException
repository - id - java.io.IOExceptionpublic boolean isMerged(IRepositoryIdProvider repository, int id) throws java.io.IOException
repository - id - java.io.IOExceptionpublic MergeStatus merge(IRepositoryIdProvider repository, int number, java.lang.String commitMessage) throws java.io.IOException
repository - number - commitMessage - java.io.IOExceptionpublic java.util.List<CommitComment> getComments(IRepositoryIdProvider repository, int id) throws java.io.IOException
repository - id - java.io.IOExceptionpublic PageIterator<CommitComment> pageComments(IRepositoryIdProvider repository, int id)
repository - id - public PageIterator<CommitComment> pageComments(IRepositoryIdProvider repository, int id, int size)
repository - id - size - public PageIterator<CommitComment> pageComments(IRepositoryIdProvider repository, int id, int start, int size)
repository - id - start - size - public CommitComment getComment(IRepositoryIdProvider repository, long commentId) throws java.io.IOException
repository - commentId - java.io.IOExceptionpublic CommitComment createComment(IRepositoryIdProvider repository, int id, CommitComment comment) throws java.io.IOException
repository - id - comment - java.io.IOExceptionpublic CommitComment replyToComment(IRepositoryIdProvider repository, int pullRequestId, int commentId, java.lang.String body) throws java.io.IOException
repository - pullRequestId - commentId - body - java.io.IOExceptionpublic CommitComment editComment(IRepositoryIdProvider repository, CommitComment comment) throws java.io.IOException
repository - comment - java.io.IOExceptionpublic void deleteComment(IRepositoryIdProvider repository, long commentId) throws java.io.IOException
repository - commentId - java.io.IOException