Hello all,
With the upgrade of Gerrit, I have also taken the time to improve the Reviewer bot. For those who do not know: the reviewer bot is a tool that adds potential reviewers to new changesets, based on subscriptions [1].
One of the problems we have encountered is the use of the SSH-based Gerrit change feed. This effectively requires 100% uptime to not miss any changesets. This has now been solved: we are now using the mediawiki-commits mailing list, and are reading the messages in a batched way (every five minutes). This change also makes development & testing much easier, which is a nice bonus.
On the backend, there are two changes: instead of the JSON RPC api, we are now using the REST api, and we have moved hosting from the toolserver to translatewiki.net (thank you, Siebrand!)
Best, Merlijn
Any chance the reviewer-bot can support additional triggers? For example, diff content, commit-message content, etc.
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.
--Waldir
On Wed, Feb 13, 2013 at 8:19 PM, Merlijn van Deen valhallasw@arctus.nlwrote:
Hello all,
With the upgrade of Gerrit, I have also taken the time to improve the Reviewer bot. For those who do not know: the reviewer bot is a tool that adds potential reviewers to new changesets, based on subscriptions [1].
One of the problems we have encountered is the use of the SSH-based Gerrit change feed. This effectively requires 100% uptime to not miss any changesets. This has now been solved: we are now using the mediawiki-commits mailing list, and are reading the messages in a batched way (every five minutes). This change also makes development & testing much easier, which is a nice bonus.
On the backend, there are two changes: instead of the JSON RPC api, we are now using the REST api, and we have moved hosting from the toolserver to translatewiki.net (thank you, Siebrand!)
Best, Merlijn
[1] http://www.mediawiki.org/wiki/Git/Reviewers
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Hi Waldir,
On 14 February 2013 02:21, Waldir Pimenta waldir@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 ;-)
Best, Merlijn
[1] https://gerrit.wikimedia.org/r/Documentation/rest-api-changes.html#_get_chan... [2] https://github.com/valhallasw/gerrit-reviewer-bot
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@arctus.nlwrote:
Hi Waldir,
On 14 February 2013 02:21, Waldir Pimenta waldir@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 ;-)
Best, Merlijn
[1] https://gerrit.wikimedia.org/r/Documentation/rest-api-changes.html#_get_chan... [2] https://github.com/valhallasw/gerrit-reviewer-bot
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
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@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@arctus.nlwrote:
Hi Waldir,
On 14 February 2013 02:21, Waldir Pimenta waldir@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 ;-)
Best, Merlijn
[1] https://gerrit.wikimedia.org/r/Documentation/rest-api-changes.html#_get_chan... [2] https://github.com/valhallasw/gerrit-reviewer-bot
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org