public interface VcsPullRequestDao extends BambooObjectDao<MutableVcsPullRequest>
Modifier and Type | Method and Description |
---|---|
PartialList<MutableVcsPullRequest> |
closePullRequestsClosedInRepository(long targetRepositoryId,
Set<String> openPrKeys)
Synchronize status of PRs in DB and in remote repository.
|
Collection<? extends MutableVcsPullRequest> |
findAll() |
MutableVcsPullRequest |
findById(long id) |
List<MutableVcsPullRequest> |
findByRepository(long repositoryId,
boolean isOpen)
Search pull requests by target repository and status.
|
MutableVcsPullRequest |
findByRepositoryAndKey(long repositoryId,
String pullRequestKey)
Search pull request by pull request key (unique on repository level) and target repository id
|
List<MutableVcsPullRequest> |
findByStatus(boolean isOpen,
long startFromId,
int limit)
Search pull requests by status.
|
int |
removeOrphanedPullRequests()
Remove pull requests which are neither linked to any repository nor to any plan branch.
|
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
Collection<? extends MutableVcsPullRequest> findAll()
@Nullable MutableVcsPullRequest findByRepositoryAndKey(long repositoryId, @NotNull String pullRequestKey)
repositoryId
- target repository idpullRequestKey
- repository-specific pull request key@NotNull List<MutableVcsPullRequest> findByRepository(long repositoryId, boolean isOpen)
repositoryId
- target repository idisOpen
- status@Nullable MutableVcsPullRequest findById(long id)
@NotNull PartialList<MutableVcsPullRequest> closePullRequestsClosedInRepository(long targetRepositoryId, @NotNull Set<String> openPrKeys)
PartialList
of updated pull requests.
If the returned list is incomplete, this method should be called again.
targetRepositoryId
- id of a remote repositoryopenPrKeys
- keys of pull requests which have open state in remote repository@NotNull List<MutableVcsPullRequest> findByStatus(boolean isOpen, long startFromId, int limit)
isOpen
- statusstartFromId
- entity id to start query fromlimit
- maximum amount of values to be returnedint removeOrphanedPullRequests()
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.