Class PullRequestDetectionServiceImpl
java.lang.Object
com.atlassian.bamboo.plan.pullrequest.PullRequestDetectionServiceImpl
- All Implemented Interfaces:
PullRequestDetectionService
-
Constructor Summary
ConstructorDescriptionPullRequestDetectionServiceImpl
(CachedPlanManager cachedPlanManager, CustomVariableContext customVariableContext, ErrorHandler errorHandler, org.springframework.orm.hibernate5.HibernateTemplate hibernateTemplate, RepositoryCachingFacade repositoryCachingFacade, ScopedExclusionService scopedExclusionService, VcsPullRequestService vcsPullRequestService, VcsRepositoryManager vcsRepositoryManager) -
Method Summary
Modifier and TypeMethodDescription@NotNull List<VcsPullRequest>
getOpenPullRequests
(@NotNull ImmutableChain chain, @NotNull VcsRepositoryData planRepositoryDefinition) Returns a list of currently open pull requests for the chain's default repository List ordering determined by underlying repository (preference is for native ordering e.g.boolean
schedulePullRequestDetectionForChain
(@NotNull ImmutableChain chain) Registers PR detection request for a given Chain.void
-
Constructor Details
-
PullRequestDetectionServiceImpl
@Inject public PullRequestDetectionServiceImpl(CachedPlanManager cachedPlanManager, CustomVariableContext customVariableContext, ErrorHandler errorHandler, org.springframework.orm.hibernate5.HibernateTemplate hibernateTemplate, RepositoryCachingFacade repositoryCachingFacade, ScopedExclusionService scopedExclusionService, VcsPullRequestService vcsPullRequestService, VcsRepositoryManager vcsRepositoryManager)
-
-
Method Details
-
startPullRequestDetection
@PostConstruct public void startPullRequestDetection() -
schedulePullRequestDetectionForChain
Description copied from interface:PullRequestDetectionService
Registers PR detection request for a given Chain. The PullRequestDetectionService will try to flatten the real PR detection execution density over time.- Specified by:
schedulePullRequestDetectionForChain
in interfacePullRequestDetectionService
- Parameters:
chain
- to be detected for pull requests- Returns:
- false if another detection for this chain is already in progress or in queue
-
getOpenPullRequests
@NotNull public @NotNull List<VcsPullRequest> getOpenPullRequests(@NotNull @NotNull ImmutableChain chain, @NotNull @NotNull VcsRepositoryData planRepositoryDefinition) throws Exception Description copied from interface:PullRequestDetectionService
Returns a list of currently open pull requests for the chain's default repository List ordering determined by underlying repository (preference is for native ordering e.g. last updated first for hg)- Specified by:
getOpenPullRequests
in interfacePullRequestDetectionService
- Parameters:
chain
- to find pull requests for.- Returns:
- a list of currently open pull requests for the chain's default repository
- Throws:
Exception
-