Verified Commit a74e86ef authored by A. Wilcox's avatar A. Wilcox 🦊
Browse files

IRC: Only print first line of commit message

Otherwise, we print a whole bunch of lines, and with long commit messages,
we could cause an Excess Flood.
parent 44ad8bca
......@@ -97,10 +97,14 @@ class IRC:
push_msg += 'to the \x02{}\x02 branch:'.format(push['branch'])
for commit in push['commits']:
try:
commit_msg = commit['msg'].splitlines()[0]
except IndexError:
commit_msg = commit['msg']
msg = '{} ( {} ) by \x02{}\x02: {}'.format(commit['id'][:7],
commit['url'],
commit['author']['name'],
commit['msg'])
commit_msg)
commit_msgs.append(msg)
if len(commit_msgs) == 3 and count > 3:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment