diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-04-10 15:05:40 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-04-10 15:05:40 -0400 |
commit | 3f06f6fb40b41813e946154d591f4d1f37b52f85 (patch) | |
tree | cc4f650ea9b1773b54b718f5e704f99e3a1d022f /b4/mbox.py | |
parent | 39181293c0cb1780e56e3eaee9ac2cc8abd8d43f (diff) | |
download | b4-3f06f6fb40b41813e946154d591f4d1f37b52f85.tar.gz |
Add summaries to default templates
They are much more useful if b4.thanks-commit-url-mask is set, but even
without them this will list all subjects and corresponding commit IDs.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/mbox.py')
-rw-r--r-- | b4/mbox.py | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -169,16 +169,6 @@ def thanks_record_am(lser): allto = email.utils.getaddresses([str(x) for x in lmsg.msg.get_all('to', [])]) allcc = email.utils.getaddresses([str(x) for x in lmsg.msg.get_all('cc', [])]) - quotelines = list() - qcount = 0 - for line in lmsg.body.split('\n'): - # Quote the first paragraph only and then [snip] if we quoted more than 5 lines - if qcount > 5 and (not len(line.strip()) or line.strip().find('---') == 0): - quotelines.append('> ') - quotelines.append('> [...]') - break - quotelines.append('> %s' % line.strip('\r\n')) - qcount += 1 out = { 'msgid': lmsg.msgid, @@ -189,7 +179,7 @@ def thanks_record_am(lser): 'cc': b4.format_addrs(allcc), 'references': b4.LoreMessage.clean_header(lmsg.msg['References']), 'sentdate': b4.LoreMessage.clean_header(lmsg.msg['Date']), - 'quote': '\n'.join(quotelines), + 'quote': b4.make_quote(lmsg.body, maxlines=5), 'patches': patches, } fullpath = os.path.join(datadir, filename) |