submit_rule(submit(W)) :-
W = label('Any-Label-Name', ok(_)).
$ cat rules.pl | ssh jerry gerrit test-submit rule -s Ib0228a1d9ae1c8fe82bbbbb4b138a4e285b99130
[
{
"status": "RULE_ERROR",
"error_message": "Submit rule :(user,submit_rule) for change 1750 of parking/mobile output invalid result: submit(label(Any-Label-Name,ok(_4F3706E))). Reason: A label with the status Any-Label-Name: OK must contain a user.",
"prolog_reduction_count": 483
}
]
--
--
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.
For more options, visit https://groups.google.com/d/optout.
On Thu, Jul 14, 2016 at 6:05 PM, Cezariusz Marek <cezariu...@gmail.com> wrote:I'm trying to create my own submit filter (to allow submit when there's a +1 CR by non-author, or +2 CR by anyone). It didn't work like expected, so I decided to start over and test all the examples first.The first example seems simple:
submit_rule(submit(W)) :-
W = label('Any-Label-Name', ok(_)).
But when I try to test it, I get the error:
$ cat rules.pl | ssh jerry gerrit test-submit rule -s Ib0228a1d9ae1c8fe82bbbbb4b138a4e285b99130
[
{
"status": "RULE_ERROR",
"error_message": "Submit rule :(user,submit_rule) for change 1750 of parking/mobile output invalid result: submit(label(Any-Label-Name,ok(_4F3706E))). Reason: A label with the status Any-Label-Name: OK must contain a user.",
"prolog_reduction_count": 483
}
]
What am I doing wrong?At the time when the cookbook was written this example worked.Some time after that the ok clause was changed to require a user (as the error message says).
And the same probably applies to the reject clause.