Class BranchCleanup
java.lang.Object
com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<BranchCleanupProperties>
com.atlassian.bamboo.specs.api.builders.plan.branches.BranchCleanup
Represent configuration of branch cleanup.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Durationstatic final intDeprecated.static final Durationstatic final intDeprecated.useDEFAULT_REMOVED_BRANCH_EXPIRYinstead. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BranchCleanupPropertiesbuild()whenInactiveInRepository(boolean removeWhenInactiveInRepository) Enables/disables plan branch removing when branch is inactive (no commits) in repository.whenInactiveInRepositoryAfterDays(int whenInactiveInRepositoryAfterDays) Defines the time after which the branch should be removed in case of inactivity.whenRemovedFromRepository(boolean removeRemovedFromRepository) Enables/disables plan branch removing when branch deleted in repository.whenRemovedFromRepositoryAfterDays(int whenRemovedFromRepositoryAfterDays) Defines the time after which the branch should be removed.
-
Field Details
-
DEFAULT_REMOVED_BRANCH_EXPIRY
-
DEFAULT_INACTIVE_BRANCH_EXPIRY
-
DEFAULT_REMOVED_BRANCH_EXPRIRY_IN_DAYS
Deprecated.useDEFAULT_REMOVED_BRANCH_EXPIRYinstead.Removed branch expiry in days. -
DEFAULT_INACTIVE_BRANCH_EXPIRY_IN_DAYS
Deprecated.useDEFAULT_INACTIVE_BRANCH_EXPIRYinstead.Inactive branch expiry in days.
-
-
Constructor Details
-
BranchCleanup
public BranchCleanup()
-
-
Method Details
-
whenRemovedFromRepository
public BranchCleanup whenRemovedFromRepository(boolean removeRemovedFromRepository) throws PropertiesValidationException Enables/disables plan branch removing when branch deleted in repository. Disabled by default.- Throws:
PropertiesValidationException
-
whenInactiveInRepository
public BranchCleanup whenInactiveInRepository(boolean removeWhenInactiveInRepository) throws PropertiesValidationException Enables/disables plan branch removing when branch is inactive (no commits) in repository. Disabled by default.- Throws:
PropertiesValidationException
-
whenRemovedFromRepositoryAfterDays
public BranchCleanup whenRemovedFromRepositoryAfterDays(int whenRemovedFromRepositoryAfterDays) throws PropertiesValidationException Defines the time after which the branch should be removed. Default isDEFAULT_REMOVED_BRANCH_EXPIRY.- Throws:
PropertiesValidationException
-
whenInactiveInRepositoryAfterDays
public BranchCleanup whenInactiveInRepositoryAfterDays(int whenInactiveInRepositoryAfterDays) throws PropertiesValidationException Defines the time after which the branch should be removed in case of inactivity. Default isDEFAULT_INACTIVE_BRANCH_EXPIRY.- Throws:
PropertiesValidationException
-
build
- Specified by:
buildin classEntityPropertiesBuilder<BranchCleanupProperties>- Throws:
PropertiesValidationException
-
DEFAULT_INACTIVE_BRANCH_EXPIRYinstead.