Hi Gerrit users,
I follow the gerrit mails to get notified of comments and to catch failing builds. The message that a build started or was successful though doesn't help me much, only clutters up space, really.
Do you agree?
If yes, I would try to silence the "Build started" and "Build successful" messages in our gerrit, if possible without too much effort...
~N
On 13 Dec 2016, at 11:36, Neels Hofmeyr nhofmeyr@sysmocom.de wrote:
Hi Gerrit users,
If yes, I would try to silence the "Build started" and "Build successful" messages in our gerrit, if possible without too much effort...
no objection.
I've found the mailing templates to *modify* what is sent, but no documented way to completely suppress a specific mail.
If a template is removed, the default internal template is used. Possibly an empty template results in an empty message to trigger this code:
if (body.length() == 0) { // If we have no message body, don't send. return false; } gerrit-server/src/main/java/com/google/gerrit/server/mail/OutgoingEmail.java
But the jenkins notifications are apparently only comments like any other users', i.e. we'd need crafty filtering and such :/
Maybe I'll come back to this some other time... <disappointed>
~N
Maybe we can suppress it inside our smtp server?
On 13.12.2016 13:41, Neels Hofmeyr wrote:
I've found the mailing templates to *modify* what is sent, but no documented way to completely suppress a specific mail.
If a template is removed, the default internal template is used. Possibly an empty template results in an empty message to trigger this code:
if (body.length() == 0) { // If we have no message body, don't send. return false; }gerrit-server/src/main/java/com/google/gerrit/server/mail/OutgoingEmail.java
But the jenkins notifications are apparently only comments like any other users', i.e. we'd need crafty filtering and such :/
Maybe I'll come back to this some other time... <disappointed>
~N
On Tue, Dec 13, 2016 at 03:23:43PM +0100, Neels Hofmeyr wrote:
I also thought about a grep + rm shell script working on my maildir files :P
I have in fact solved my problem locally now, so I won't press this from my side anymore, though I'd be +1 for reducing the mails for everyone.
In maildir where each mail is in a separate file:
move_to_dropped() { while read f; do # make sure jenkins is the sender if [ -n "$(grep '^From: Jenkins Builder gerrit-no-reply@lists.osmocom.org$' "$f")" ]; then echo mv "$f" "$dropped_dir" mv "$f" "$dropped_dir" fi done }
rgrep -l '^Build Started http://jenkins.osmocom.org/jenkins/job' "$inbox" | move_to_dropped rgrep -l '^Build Successful $' "$inbox" | move_to_dropped
~N