Class PullRequestDetectionServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.plan.pullrequest.PullRequestDetectionServiceImpl
-
- All Implemented Interfaces:
PullRequestDetectionService
public class PullRequestDetectionServiceImpl extends Object implements PullRequestDetectionService
-
-
Constructor Summary
Constructors Constructor Description PullRequestDetectionServiceImpl(CachedPlanManager cachedPlanManager, CustomVariableContext customVariableContext, ErrorHandler errorHandler, org.springframework.orm.hibernate5.HibernateTemplate hibernateTemplate, RepositoryCachingFacade repositoryCachingFacade, ScopedExclusionService scopedExclusionService, VcsPullRequestService vcsPullRequestService, VcsRepositoryManager vcsRepositoryManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @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
startPullRequestDetection()
-
-
-
Constructor Detail
-
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 Detail
-
startPullRequestDetection
@PostConstruct public void startPullRequestDetection()
-
schedulePullRequestDetectionForChain
public boolean schedulePullRequestDetectionForChain(@NotNull @NotNull ImmutableChain chain)
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
-
-