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)
VcsPullRequestService
findByRepositoryAndKey
in interface VcsPullRequestService
targetRepositoryId
- target repository idpullRequestKey
- repository-specific pull request keypublic List<VcsPullRequest> findOpenByRepository(long targetRepositoryId)
VcsPullRequestService
findOpenByRepository
in interface VcsPullRequestService
targetRepositoryId
- target repository idpublic void closePullRequest(@NotNull VcsPullRequest pr)
VcsPullRequestService
closePullRequest
in interface VcsPullRequestService
@NotNull public VcsPullRequest createPullRequest(@NotNull String pullRequestKey, @Nullable Long sourceRepositoryId, @NotNull String source, long targetRepositoryId, @NotNull String target, boolean isOpen)
VcsPullRequestService
createPullRequest
in interface VcsPullRequestService
public void updatePullRequest(@NotNull VcsPullRequest pr, Long sourceRepositoryId, @NotNull String source, @NotNull String target, boolean isOpen)
VcsPullRequestService
updatePullRequest
in interface VcsPullRequestService
public void closePullRequestsClosedInRepository(long targetRepositoryId, @NotNull List<VcsPullRequest> openPullRequests)
VcsPullRequestService
closePullRequestsClosedInRepository
in interface VcsPullRequestService
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.