Does branch permission accept pattern like this : release-1.0.0-product-{alpha1,alpha2,rc1,rc2}
Hi @Mohit Sharma ,
I think that's a no. Brace expressions such as {} syntax should be supported in pipelines trigger conditions but I don't think it's supported in branch permissions.
You could potentially try using wildcards/a wildcard character to either the start or the end of a string to match multiple branches. For example, release-* would match any branch starting with "release-"
release-*
Also, you could maybe try this:
Since you cannot use a single pattern with brace expansion, you should create separate branch restrictions for each specific pattern or use a broader wildcard if appropriate: Create one restriction for release-1.0.0-product-alpha* Create another for release-1.0.0-product-rc* Alternatively, if these branches are part of a specific workflow, you can use Branch Types (if your branching model is enabled) to apply permissions to all "release" branches simultaneously.
Since you cannot use a single pattern with brace expansion, you should create separate branch restrictions for each specific pattern or use a broader wildcard if appropriate:
Create one restriction for release-1.0.0-product-alpha*
release-1.0.0-product-alpha*
Create another for release-1.0.0-product-rc*
release-1.0.0-product-rc*
Alternatively, if these branches are part of a specific workflow, you can use Branch Types (if your branching model is enabled) to apply permissions to all "release" branches simultaneously.
But I'm no expert in this, so you'll have to test this around 🧪
Cheers,Tobi
Thank you for inputs, a pretty helpful information. Regards,
Mohit
It looks like you're new here. Sign in or register to get started.