@ExperimentalApi
public interface PlanBranchPullRequestService
plan branches
and pull requests
.PlanBranchPullRequest
Modifier and Type | Method and Description |
---|---|
PlanBranchPullRequest |
create(ChainBranch chainBranch,
MutableVcsPullRequest vcsPullRequest)
Creates a new link between chain branch and pull request.
|
PlanBranchPullRequest |
create(PlanKey branchKey,
long pullRequestId)
Creates a new link between chain branch and pull request.
|
boolean |
deleteForChainBranch(long branchId)
Deletes a link for the given plan branch.
|
boolean |
deleteForChainBranch(PlanKey branchKey)
Deletes a link for the given plan branch.
|
int |
deleteForVcsPullRequest(long pullRequestId)
Deletes all links for the given pull request.
|
Optional<PlanBranchPullRequest> |
findForChainAndPullRequest(long chainId,
long pullRequestId)
|
Optional<PlanBranchPullRequest> |
findForChainAndPullRequest(PlanKey chainKey,
long pullRequestId)
|
Optional<PlanBranchPullRequest> |
findForChainBranch(long branchId)
Retrieves a
PlanBranchPullRequest connection for the given plan branch by branch id. |
Optional<PlanBranchPullRequest> |
findForChainBranch(PlanKey branchKey)
Retrieves a
PlanBranchPullRequest connection for the given plan branch by branch key. |
List<PlanBranchPullRequest> |
findForPullRequest(long pullRequestId)
Retrieves all
PlanBranchPullRequest connections for the given pull request by pull
request database id. |
@NotNull Optional<PlanBranchPullRequest> findForChainBranch(long branchId)
PlanBranchPullRequest
connection for the given plan branch
by branch id.
Only one VCS pull request may be associated with a plan branch.branchId
- id of the plan branchPlanBranchPullRequest
if found@NotNull Optional<PlanBranchPullRequest> findForChainBranch(@NotNull PlanKey branchKey)
PlanBranchPullRequest
connection for the given plan branch
by branch key.
Only one VCS pull request may be associated with a plan branch.branchKey
- key of the plan branchPlanBranchPullRequest
if found@NotNull Optional<PlanBranchPullRequest> findForChainAndPullRequest(long chainId, long pullRequestId)
PlanBranchPullRequest
connection for the given chain
and pull request
. Should yield only one result, since a single pull requests should only create a
single plan branch
per plan.chainId
- id of the top level planpullRequestId
- id of the VCS pull requestPlanBranchPullRequest
if found@NotNull Optional<PlanBranchPullRequest> findForChainAndPullRequest(@NotNull PlanKey chainKey, long pullRequestId)
PlanBranchPullRequest
connection for the given chain
and pull request
. Should yield only one result, since a single pull requests should only create a
single plan branch
per plan.chainKey
- key of the top level planpullRequestId
- id of the VCS pull requestPlanBranchPullRequest
if found@NotNull List<PlanBranchPullRequest> findForPullRequest(long pullRequestId)
PlanBranchPullRequest
connections for the given pull request
by pull
request database id. Multiple plan branches may be associated with a single pull request.pullRequestId
- id of the pull requestPlanBranchPullRequest
s@NotNull PlanBranchPullRequest create(@NotNull PlanKey branchKey, long pullRequestId)
branchKey
- key of the chain branch to linkpullRequestId
- id of the pull request to linkIllegalStateException
- if any pull request is already linked to the given plan branch@NotNull PlanBranchPullRequest create(@NotNull ChainBranch chainBranch, @NotNull MutableVcsPullRequest vcsPullRequest)
chainBranch
- chain branch to linkvcsPullRequest
- pull request to linkIllegalStateException
- if any pull request is already linked to the given plan branchboolean deleteForChainBranch(long branchId)
branchId
- id of the plan branchboolean deleteForChainBranch(@NotNull PlanKey branchKey)
branchKey
- key of the plan branchint deleteForVcsPullRequest(long pullRequestId)
pullRequestId
- id of the vcs pull requestCopyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.