Bug 1352809 - Use shorter revision id for e-mail subject; r?catlee
On a narrow screen, the e-mail subject is truncated when viewing your
inbox (at least in Gmail), so you get e-mail subjects like
try submission 4b1ebb3fda263851ba0ca804f8ea6bb72a09
which is not very helpful if you have several such e-mails. Instead,
output just a prefix of the hash, so the rest is visible, like this:
try submission 4b1ebb3:
Bug 1297414 - Change defaul
It might be reasonable to omit the hash entirely, and/or the word
"submission", but this change should be good enough for me to tell apart
the e-mails in my inbox.
--- a/status/generators.py
+++ b/status/generators.py
@@ -1,18 +1,19 @@
import re
def buildTryChangeMessage(change, packageDir):
got_revision = revision = change.revision
+ short_revision = revision[:7]
who = change.who
tree = change.branch
packageDir = packageDir % locals()
msgdict = {"type": "plain"}
- msgdict['subject'] = "%(tree)s submission %(revision)s" % locals()
+ msgdict['subject'] = "%(tree)s submission %(short_revision)s" % locals()
msgdict['headers'] = {"In-Reply-To": "<%(tree)s-%(revision)s>" % locals(),
"References": "<%(tree)s-%(revision)s>" % locals(),
}
msgdict["body"] = """\
Thank you for your try submission. It's the best!
Results will be displayed on Treeherder as they come in:
https://treeherder.mozilla.org/#/jobs?repo=%(tree)s&revision=%(revision)s