public class BranchDetectionServiceImpl extends Object implements BranchDetectionService
Modifier and Type | Field and Description |
---|---|
static String |
BANDANA_ENFORCE_POLLING |
Constructor and Description |
---|
BranchDetectionServiceImpl(com.atlassian.bandana.BandanaManager bandanaManager,
CachedPlanManager cachedPlanManager,
CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager,
ChainBranchManager chainBranchManager,
CustomVariableContext customVariableContext,
ErrorHandler errorHandler,
org.springframework.orm.hibernate5.HibernateTemplate hibernateTemplate,
LightweightBranchCreationService lightweightBranchCreationService,
RepositoryCachingFacade repositoryCachingFacade,
ScopedExclusionService scopedExclusionService,
VcsBranchManager vcsBranchManager,
VcsRepositoryManager vcsRepositoryManager) |
Modifier and Type | Method and Description |
---|---|
PlanKey |
createChainBranch(ImmutableChain chain,
String branchName,
VcsBranch vcsBranch,
BuildConfiguration buildConfiguration,
PlanCreationService.EnablePlan enablePlan,
boolean enableExpiry)
Temporary workaround for branchinator to work.
|
void |
detectBranchesForRepository(long repositoryId,
boolean ignoreChainsConfig)
Immediately executes branch detection for a given repository and creates new plan branches for chains using this repository as default.
|
Optional<List<VcsBranch>> |
getOpenBranches(VariableSubstitutor variableSubstitutor,
VcsRepositoryData vcsRepositoryData,
VcsBranchDetector branchDetector,
ErrorCollection errorCollection,
Iterable<ImmutableChain> chains)
Returns a list of currently open branches for given repository.
|
boolean |
scheduleBranchDetectionForRepository(long repositoryId)
Schedules branch detection for given repository
|
boolean |
scheduleBranchListInitialisation(Chain chain)
Schedules initialisation of existing vcs branch list.
|
public static final String BANDANA_ENFORCE_POLLING
public BranchDetectionServiceImpl(com.atlassian.bandana.BandanaManager bandanaManager, CachedPlanManager cachedPlanManager, CachedRepositoryDefinitionManager cachedRepositoryDefinitionManager, ChainBranchManager chainBranchManager, CustomVariableContext customVariableContext, ErrorHandler errorHandler, org.springframework.orm.hibernate5.HibernateTemplate hibernateTemplate, LightweightBranchCreationService lightweightBranchCreationService, RepositoryCachingFacade repositoryCachingFacade, ScopedExclusionService scopedExclusionService, VcsBranchManager vcsBranchManager, VcsRepositoryManager vcsRepositoryManager)
public PlanKey createChainBranch(@NotNull ImmutableChain chain, @NotNull String branchName, @Nullable VcsBranch vcsBranch, @Nullable BuildConfiguration buildConfiguration, @NotNull PlanCreationService.EnablePlan enablePlan, boolean enableExpiry) throws PlanCreationDeniedException
BranchDetectionService
createChainBranch
in interface BranchDetectionService
PlanCreationDeniedException
public boolean scheduleBranchListInitialisation(@NotNull Chain chain)
BranchDetectionService
scheduleBranchListInitialisation
in interface BranchDetectionService
chain
- chain which vcs branches list should be initializedpublic boolean scheduleBranchDetectionForRepository(long repositoryId)
BranchDetectionService
scheduleBranchDetectionForRepository
in interface BranchDetectionService
public void detectBranchesForRepository(long repositoryId, boolean ignoreChainsConfig)
BranchDetectionService
detectBranchesForRepository
in interface BranchDetectionService
repositoryId
- id of the repositoryignoreChainsConfig
- allows to force branch creation and cleanup for all related chains. If true branch detection
will be executed even if a chain is not configured to automatically manage branches.@NotNull public Optional<List<VcsBranch>> getOpenBranches(@NotNull VariableSubstitutor variableSubstitutor, @NotNull VcsRepositoryData vcsRepositoryData, @NotNull VcsBranchDetector branchDetector, @Nullable ErrorCollection errorCollection, @NotNull Iterable<ImmutableChain> chains)
BranchDetectionService
getOpenBranches
in interface BranchDetectionService
variableSubstitutor
- variable substitutor to use for substituting repository configurationvcsRepositoryData
- the repositorybranchDetector
- executor responsible for branch detectionerrorCollection
- errors collection to add errors tochains
- list of chains against which errors will be recordedCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.
View cookie preferences