Class PlanBranchManagement
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbranchIntegration
(@NotNull BranchIntegration branchIntegration) Sets default merge strategy for new branches.protected PlanBranchManagementProperties
build()
Create new plan branches for new pull requests - pull requests only from branches.createForPullRequest
(boolean allowPullRequestFromForks) Create new plan branches for new pull requests - pull requests either from branches or from both branches and forks.Create new plan branches for new branches in default repository.createForVcsBranchMatching
(String pattern) Create new plan branches for new branches with name which matches pattern.Disable automatic plan branch creation.defaultTrigger
(@NotNull Trigger<?, ?> defaultTrigger) Created plan branch will use a custom trigger.delete
(@NotNull BranchCleanup removedBranchCleanup) Sets configuration of automatic removal of branches.issueLinkingEnabled
(boolean issueLinkingEnabled) Enables/disables automatic JIRA issue link creation when new branch is created.No notifications will be sent for the created branch.All committers and people who have favourited the branch will be notified for all build failures and the first successful build.Use the same notification rules as configured for the master plan.Created plan branch will use the same triggers as master plan.Created plan branch can only be triggered manually only.
-
Constructor Details
-
PlanBranchManagement
public PlanBranchManagement()
-
-
Method Details
-
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
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
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
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
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:
-
triggerBuildsManually
Created plan branch can only be triggered manually only.This setting is ignored for Specs branches. Use
Plan.triggers(Trigger[])
instead. -
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
Created plan branch will use a custom trigger.This setting is ignored for Specs branches. Use
Plan.triggers(Trigger[])
instead. -
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
Use the same notification rules as configured for the master plan.This setting is ignored for Specs branches. Use
Plan.notifications(Notification...)
instead. -
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:
-
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
- Specified by:
build
in classEntityPropertiesBuilder<PlanBranchManagementProperties>
- Throws:
PropertiesValidationException
-