On 7 Aug 2023, at 13:04, Sweta Asnodkar <sweta.notim...@gmail.com> wrote:Hello Team,I am sorry if I am creating a spam by creating another conversation, but I wanted to have a separate conversation/topic on my company's requirement for submit rules.
I am using below rules.pl and OWNERS file in order to get the approval from required reviewers on file/folder basis.
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/f3fb5a93-ba11-4897-bdb7-dfc5ae7aeb48n%40googlegroups.com.
Hi Sweta,On 7 Aug 2023, at 13:04, Sweta Asnodkar <sweta.notim...@gmail.com> wrote:Hello Team,I am sorry if I am creating a spam by creating another conversation, but I wanted to have a separate conversation/topic on my company's requirement for submit rules.You can create new features requirements at [1].I am using below rules.pl and OWNERS file in order to get the approval from required reviewers on file/folder basis.Are you aware that Gerrit is abandoning Prolog rules? You can use the owners or code-owners plugins without the need of using Prolog: just use the submit requirements [2].
Why don’t you simply define a submit requirement that says that authors cannot self-approve changes?
Can you express your requirement without the use of Prolog?
On Monday, August 7, 2023 at 6:57:54 PM UTC+5:30 Luca Milanesio wrote:Hi Sweta,On 7 Aug 2023, at 13:04, Sweta Asnodkar <sweta.notim...@gmail.com> wrote:Hello Team,I am sorry if I am creating a spam by creating another conversation, but I wanted to have a separate conversation/topic on my company's requirement for submit rules.You can create new features requirements at [1].I am using below rules.pl and OWNERS file in order to get the approval from required reviewers on file/folder basis.Are you aware that Gerrit is abandoning Prolog rules? You can use the owners or code-owners plugins without the need of using Prolog: just use the submit requirements [2].>> Yes, I tried switching over to submit requirement using https://gerrit.googlesource.com/plugins/owners/+/refs/heads/stable-3.6/owners/src/main/resources/Documentation/config.mdI enabled submit requirement by adding "[owners] enableSubmitRequirement = true" under gerrit.config file.
As per the document, there was no need to add submit requirement in project.config file. When I try to make submission, OWNERS are getting assigned but the submit button is enabled by default. It was not checking for any conditions.
Then added submit requirement as below:
[submit-requirement "Code-Review"]
description = A maximum vote from a non-uploader is required for the \
'Code-Review' label. A minimum vote is blocking.
submittableIf = label:Code-Review=MAX,user=non_uploader AND -label:Code-Review=MIN
canOverrideInChildProjects = true
Now it needed code review which was expected. But when any user who is not a part of the OWNERS list gives a +2, the submission can be submitted as submit button is enabled.
There is no condition for OWNERS votes requirement here.
I thought just by enabling submit requirement all the conditions mentioned in the config document of OWNERS plugin would satisfy my requirments. But that's not the case.
I think I am missing some configuration somehow. As at least default submit rule of getting code-review as +2 should have been available without submit requirements right?