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 Duration
static final int
Deprecated.static final Duration
static final int
Deprecated.useDEFAULT_REMOVED_BRANCH_EXPIRY
instead. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BranchCleanupProperties
build()
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_EXPIRY
instead.Removed branch expiry in days. -
DEFAULT_INACTIVE_BRANCH_EXPIRY_IN_DAYS
Deprecated.useDEFAULT_INACTIVE_BRANCH_EXPIRY
instead.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:
build
in classEntityPropertiesBuilder<BranchCleanupProperties>
- Throws:
PropertiesValidationException
-
DEFAULT_INACTIVE_BRANCH_EXPIRY
instead.