Hi, Teams
I want to add Label Verified as a submit requirement with multiple branches,
say master and Branch_B. so I wrote some rules:
In the parent project:
[label "Verified"]
branch = refs/heads/master
function = NoBlock
value = -1 Fails
value = 0 No score
value = +1 Verified
copyCondition = changekind:NO_CHANGE OR changekind:NO_CODE_CHANGE
defaultValue = 0
[submit-requirement "Verified"]
submittableIf = label:Verified=MAX AND -label:Verified=MIN
applicableIf = branch:refs/heads/master
canOverrideInChildProjects = true
In the child project:
[label "Verified"]
branch = refs/heads/master
branch = refs/heads/ibrt_rc_0.6
function = NoBlock
value = -1 Fails
value = 0 No score
value = +1 Verified
copyCondition = changekind:NO_CHANGE OR changekind:NO_CODE_CHANGE
defaultValue = 0
[submit-requirement "Verified"]
submittableIf = label:Verified=MAX AND -label:Verified=MIN
applicableIf = branch:^refs/heads/(master|Branch_B)
This can not work, there is no label Verified with change of Branch_B(child project).
seems the regulator is no workable.
(I have also tried applicableIf = branch:^refs/heads/(master|Branch_B).*, still not work)
But if a change the 'applicableIf' like this
applicableIf = branch:refs/heads/master OR branch:refs/heads/Branch_B
The label Verified display.
But this maybe not good, e.g. if I have a lot of branches, I have to spell
a lot of characters.
So are there better methods? please give some advice, thanks!
Br,
Yingchun