Update: A new version has been deployed that supports the "match_all_files"
parameter to make "file_regexp" apply to all files in the patchset, rather
than any of the files. Example use:
{{Gerrit-reviewer|User
1|file_regexp=<nowiki>\.txt</nowiki>|match_all_files}}
Still lacking is support for a "commit_msg_regexp" parameter, which should
work similarly to the existing "file_regexp".
--Waldir
On Fri, Feb 15, 2013 at 7:42 AM, Waldir Pimenta <waldir(a)email.com> wrote:
It's not critical to support diff content if
commit messages can be used.
In fact diffs would just be a "nice to have" feature, but the commit
message ought to be much more informative anyway.
As for a pull request, I'll give it a shot.
--Waldir
On Thu, Feb 14, 2013 at 8:31 PM, Merlijn van Deen <valhallasw(a)arctus.nl>wrote;wrote:
Hi Waldir,
On 14 February 2013 02:21, Waldir Pimenta <waldir(a)email.com> wrote:
Any chance the reviewer-bot can support
additional triggers? For
example,
diff content, commit-message content, etc.
Anything that is available from the changes REST api (see [1]) can be
added with relative easy. This includes the commit message, but not
the diff content (but it might be available in a newer Gerrit
release).
It would be possible to get the data from either the JSON-RPC api
(with a high risk of breakage on new Gerrit deployments) or via git,
but this would be an considerable effort.
Also, it wold be nice to specify whether the
currently supported filters
should apply to ANY of the files in the change (the current behavior) or
ALL of the changed files.
There is no fundamental reason why this would be impossible, but the
syntax might quickly become complicated. It would require only a few
lines of code and an extra parameter ('file_regexp_all'). The use case
you described on IRC ('new reviewers who only want to review changes
that only contain .css files') makes sense.
I won't have time in the coming weeks to
implement either one of
those, though. Feel free to implement it yourself & to submit a pull
request, though. I have just added some functionality to easily test
suggested reviewers from the command line. For more details, please
see [2]. In any case, it's on my to-do list, and I'll get to it when I
get to it ;-)