Hi All,
I have a requirement for my project to provide the self-review option for team lead and manager and exclude all other team members from self-review of their own changes of that project. And here i need one can able to review other's changes.
I tried to implement this feature with the code given below. Once i added the code and to the project and push, I am unable to see the "Publish and Submit" button even i am an Administrator.
Here is the code i have placed in rules.pl
submit_rule(submit(CR, V)) :-
base(CR, V),
CR = label(_, ok(Reviewer)),
gerrit:commit_author(Author),
Author \= Reviewer,
!.
submit_rule(submit(CR, V, N)) :-
base(CR, V),
N = label('Non-Author-Code-Review', need(_)).
base(CR, V) :-
gerrit:max_with_block(-2, 2, 'Code-Review', CR),
gerrit:max_with_block(-1, 1, 'Verified', V).
from https://gerrit-review.googlesource.com/Documentation/prolog-cookbook.html#_example_8_make_change_submittable_only_if_tt_code_review_2_tt_is_given_by_a_non_author
Can some one suggest me how i can implement this?
Regards,
Samba.