public class VcsPullRequestServiceImpl extends Object implements VcsPullRequestService
| Constructor and Description |
|---|
VcsPullRequestServiceImpl(com.atlassian.event.api.EventPublisher eventPublisher,
VcsPullRequestDao vcsPullRequestDao) |
| Modifier and Type | Method and Description |
|---|---|
void |
closePullRequest(VcsPullRequest pr)
Mark pull request as closed.
|
void |
closePullRequestsClosedInRepository(long targetRepositoryId,
List<VcsPullRequest> openPullRequests)
Synchronize the status of pull requests in DB and in remote repository
|
VcsPullRequest |
createPullRequest(String pullRequestKey,
Long sourceRepositoryId,
String source,
long targetRepositoryId,
String target,
boolean isOpen)
Create new pull request and save it.
|
VcsPullRequest |
findByRepositoryAndKey(long targetRepositoryId,
String pullRequestKey)
Search pull request by pull request key (unique on repository level) and target repository id
|
List<VcsPullRequest> |
findOpenByRepository(long targetRepositoryId)
Search open pull requests by target repository and status.
|
void |
updatePullRequest(VcsPullRequest pr,
Long sourceRepositoryId,
String source,
String target,
boolean isOpen)
Modify pull request.
|
@Inject
public VcsPullRequestServiceImpl(com.atlassian.event.api.EventPublisher eventPublisher,
VcsPullRequestDao vcsPullRequestDao)
public VcsPullRequest findByRepositoryAndKey(long targetRepositoryId, @NotNull String pullRequestKey)
VcsPullRequestServicefindByRepositoryAndKey in interface VcsPullRequestServicetargetRepositoryId - target repository idpullRequestKey - repository-specific pull request keypublic List<VcsPullRequest> findOpenByRepository(long targetRepositoryId)
VcsPullRequestServicefindOpenByRepository in interface VcsPullRequestServicetargetRepositoryId - target repository idpublic void closePullRequest(@NotNull
VcsPullRequest pr)
VcsPullRequestServiceclosePullRequest in interface VcsPullRequestService@NotNull public VcsPullRequest createPullRequest(@NotNull String pullRequestKey, @Nullable Long sourceRepositoryId, @NotNull String source, long targetRepositoryId, @NotNull String target, boolean isOpen)
VcsPullRequestServicecreatePullRequest in interface VcsPullRequestServicepublic void updatePullRequest(@NotNull
VcsPullRequest pr,
Long sourceRepositoryId,
@NotNull
String source,
@NotNull
String target,
boolean isOpen)
VcsPullRequestServiceupdatePullRequest in interface VcsPullRequestServicepublic void closePullRequestsClosedInRepository(long targetRepositoryId,
@NotNull
List<VcsPullRequest> openPullRequests)
VcsPullRequestServiceclosePullRequestsClosedInRepository in interface VcsPullRequestServiceCopyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.