mibexsoftware / bamboo-plan-dsl-plugin

Configuration as code with a Groovy-based DSL or YAML for Atlassian Bamboo.
https://marketplace.atlassian.com/plugins/ch.mibex.bamboo.plandsl/
Other
40 stars 16 forks source link

Branch name validation issue with git-flow #36

Closed muchino closed 7 years ago

muchino commented 7 years ago

Hi

At the moment the branch name is validated here: https://github.com/mibexsoftware/bamboo-plan-dsl-plugin/blob/214151b646b223295a4ada3630c1e8b2db8150de/src/main/groovy/ch/mibex/bamboo/plandsl/dsl/branches/Branch.groovy#L35

But the used regex /[A-Za-z0-9_\-. ]+/ is invalid, if we use git-flow generated branch names like feature/SUPPORT-12345-this-is-an-issue-in5.6

this prevents us to create branch plans afterwards and the plans for all already existing branches ;)

Can you change this regex?

mrueegg commented 7 years ago

@muchino Sorry, I somehow didn't get a notification about this one. Will now look into it!

mrueegg commented 7 years ago

@muchino The problem is that the plug-in currently only supports to specify the name of the plan branch. For the plan branch name, the validation regex is fine. But we also need to support the name of the repository branch:

planbranchname

We will introduce a new property with the next release of the plug-in to also configure the VCS branch name.

muchino commented 7 years ago

Thanks a lot 👍

mrueegg commented 7 years ago

With version 1.8.0, you can now configure the name of the VCS branch individually beside the name of the Bamboo plan branch:

    branch(name: 'feature_ui_improvements') {
          vcsBranchName 'feature/ui_improvements'
    }

Hope that helps :-)