Hello,
From what I have seen, defining function = MaxWithBlock is deprecated in the label definition. As a result, we need to use submit-requirements. However, I would want the submit-requirement to apply to the same branches as those defined in the label definition.
Let's say we have this in the label def:
branch = ^refs/heads/master|refs/heads/(aaa|bbb)/[a-zA-Z0-9_-]+|refs/heads/bbb/(?!exempt[1,3])(?!another_one[1,2,3])
The problem is that the applicableIf block form the submit-requirement does not support the same kind of regex and I have trouble finding an efficient way of defining exempt branches. So far, I came up with this:
applicableIf = -branch:refs/heads/bbb/exempt1 AND -branch:refs/heads/bbb/exempt3 AND -branch:refs/heads/another_one1 AND -branch:refs/heads/bbb/another_one2 AND -branch:refs/heads/bbb/another_one3... (there are a lot of branches).
This does not seem like a viable solution long term, especially if new branches are added. Is there a better alternative?
Thank you.