submit_rule(S) :-
gerrit:default_submit(D),
D =.. [submit | Ds],
findall(U, gerrit:commit_label(label('Code-Review', 1), U), Approvers),
gerrit_owners:add_owner_approval(Approvers, Ds, A),
S =.. [submit | A].
I wanted this to be applied to all projects which inherited All-Projects. So, I added the below submit_filter to All-Projects. But I dont see the OWNERS code review getting mandated. I am able to submit my change in the repo which inherits All-Projects without owner's approval defined in OWNERS file of that repo.
submit_filter(In, Out) :-
In =.. [submit | Ls],
findall(U, gerrit:commit_label(label('Code-Review', 1), U), Approvers),
gerrit_owners:add_owner_approval(Approvers, Ls, A),
Out =.. [submit | A].
Please help me if I am doing anything wrong with the submit_filter here.
Thanks in advance
-Sharath