Class PlanBranchManagement
- java.lang.Object
-
- com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<PlanBranchManagementProperties>
-
- com.atlassian.bamboo.specs.api.builders.plan.branches.PlanBranchManagement
-
public class PlanBranchManagement extends EntityPropertiesBuilder<PlanBranchManagementProperties>
Represents configuration of automatic branch management. These settings are only applied on the master plan and as defaults for non-Specs branches.
-
-
Constructor Summary
Constructors Constructor Description PlanBranchManagement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlanBranchManagementbranchIntegration(@NotNull BranchIntegration branchIntegration)Sets default merge strategy for new branches.protected PlanBranchManagementPropertiesbuild()PlanBranchManagementcreateForPullRequest()Create new plan branches for new pull requests - pull requests only from branches.PlanBranchManagementcreateForPullRequest(boolean allowPullRequestFromForks)Create new plan branches for new pull requests - pull requests either from branches or from both branches and forks.PlanBranchManagementcreateForVcsBranch()Create new plan branches for new branches in default repository.PlanBranchManagementcreateForVcsBranchMatching(java.lang.String pattern)Create new plan branches for new branches with name which matches pattern.PlanBranchManagementcreateManually()Disable automatic plan branch creation.PlanBranchManagementdefaultTrigger(@NotNull Trigger<?,?> defaultTrigger)Created plan branch will use a custom trigger.PlanBranchManagementdelete(@NotNull BranchCleanup removedBranchCleanup)Sets configuration of automatic removal of branches.PlanBranchManagementissueLinkingEnabled(boolean issueLinkingEnabled)Enables/disables automatic JIRA issue link creation when new branch is created.PlanBranchManagementnotificationDisabled()No notifications will be sent for the created branch.PlanBranchManagementnotificationForCommitters()All committers and people who have favourited the branch will be notified for all build failures and the first successful build.PlanBranchManagementnotificationLikeParentPlan()Use the same notification rules as configured for the master plan.PlanBranchManagementtriggerBuildsLikeParentPlan()Created plan branch will use the same triggers as master plan.PlanBranchManagementtriggerBuildsManually()Created plan branch can only be triggered manually only.
-
-
-
Method Detail
-
createManually
public PlanBranchManagement createManually()
Disable automatic plan branch creation.In RSS mode, the branch creation is controlled by the master plan. This setting has no effect on a branch.
-
createForPullRequest
public PlanBranchManagement createForPullRequest(boolean allowPullRequestFromForks)
Create new plan branches for new pull requests - pull requests either from branches or from both branches and forks.In RSS mode, the branch creation is controlled by the master plan. This setting has no effect on a branch.
- Parameters:
allowPullRequestFromForks- if pull requests from forks are allowed. If false, then plan branch will be created only for PRs from default repository
-
createForPullRequest
public PlanBranchManagement createForPullRequest()
Create new plan branches for new pull requests - pull requests only from branches.In RSS mode, the branch creation is controlled by the master plan. This setting has no effect on a branch.
-
createForVcsBranch
public PlanBranchManagement createForVcsBranch()
Create new plan branches for new branches in default repository.In RSS mode, the branch creation is controlled by the master plan. This setting has no effect on a branch.
-
createForVcsBranchMatching
public PlanBranchManagement createForVcsBranchMatching(java.lang.String pattern)
Create new plan branches for new branches with name which matches pattern.In RSS mode, the branch creation is controlled by the master plan. This setting has no effect on a branch.
- Parameters:
pattern- regexp to match branch name
-
delete
public PlanBranchManagement delete(@NotNull @NotNull BranchCleanup removedBranchCleanup) throws PropertiesValidationException
Sets configuration of automatic removal of branches. The feature is turned off by default.In RSS mode, the branch expiry is controlled by the master plan. This setting has no effect on a branch.
- Throws:
PropertiesValidationException- See Also:
BranchCleanup
-
triggerBuildsManually
public PlanBranchManagement triggerBuildsManually()
Created plan branch can only be triggered manually only.This setting is ignored for Specs branches. Use
Plan.triggers(Trigger[])instead.
-
triggerBuildsLikeParentPlan
public PlanBranchManagement triggerBuildsLikeParentPlan()
Created plan branch will use the same triggers as master plan.This setting is ignored for Specs branches. Use
Plan.triggers(Trigger[])instead.
-
defaultTrigger
public PlanBranchManagement defaultTrigger(@NotNull @NotNull Trigger<?,?> defaultTrigger)
Created plan branch will use a custom trigger.This setting is ignored for Specs branches. Use
Plan.triggers(Trigger[])instead.
-
notificationForCommitters
public PlanBranchManagement notificationForCommitters()
All committers and people who have favourited the branch will be notified for all build failures and the first successful build.This setting is ignored for Specs branches. Use
Plan.notifications(Notification...)instead.
-
notificationLikeParentPlan
public PlanBranchManagement notificationLikeParentPlan()
Use the same notification rules as configured for the master plan.This setting is ignored for Specs branches. Use
Plan.notifications(Notification...)instead.
-
notificationDisabled
public PlanBranchManagement notificationDisabled()
No notifications will be sent for the created branch.This setting is ignored for Specs branches. Use
Plan.notifications(Notification...)instead.
-
branchIntegration
public PlanBranchManagement branchIntegration(@NotNull @NotNull BranchIntegration branchIntegration) throws PropertiesValidationException
Sets default merge strategy for new branches. By default merging is turned off.This setting is ignored for Specs branches. Use
Plan.branchConfiguration(PlanBranchConfiguration)instead.- Throws:
PropertiesValidationException- See Also:
BranchIntegration
-
issueLinkingEnabled
public PlanBranchManagement issueLinkingEnabled(boolean issueLinkingEnabled) throws PropertiesValidationException
Enables/disables automatic JIRA issue link creation when new branch is created. Enabled by default.- Throws:
PropertiesValidationException
-
build
protected PlanBranchManagementProperties build() throws PropertiesValidationException
- Specified by:
buildin classEntityPropertiesBuilder<PlanBranchManagementProperties>- Throws:
PropertiesValidationException
-
-