From 68e96c0617c3a22e0a0be340965f054c21054b49 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 1 Nov 2012 18:04:09 -0400 Subject: [PATCH] humbug_trac: Don't send some updates without a comment. (imported from commit 2cf5e8c2fc1cefcbfe440b2e29d89b78f19205e6) --- bots/humbug_trac.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bots/humbug_trac.py b/bots/humbug_trac.py index 75e6485..3a4850c 100644 --- a/bots/humbug_trac.py +++ b/bots/humbug_trac.py @@ -63,6 +63,14 @@ class HumbugPlugin(Component): `old_values` is a dictionary containing the previous values of the fields that have changed. """ + if not comment and set(old_values.keys()) <= set(["priority", "milestone", + "cc", "keywords", + "component"]): + # This is probably someone going through trac and updating + # the priorities; this can result in a lot of messages + # nobody wants to read, so don't send them without a comment. + return + content = "%s updated %s" % (author, markdown_ticket_url(ticket)) if comment: content += ' with comment: %s\n\n' % (markdown_block(comment,))