##// END OF EJS Templates
slack: added a case for SVN commits to trunk
marcink -
r2647:b00c6b3e default
parent child Browse files
Show More
@@ -267,12 +267,20 b' class SlackIntegrationType(IntegrationTy'
267 title = render_with_traceback(template, data=data)
267 title = render_with_traceback(template, data=data)
268
268
269 repo_push_template = Template(textwrap.dedent(r'''
269 repo_push_template = Template(textwrap.dedent(r'''
270 %for branch, branch_commits in branches_commits.items():
270 <%
271 ${len(branch_commits['commits'])} ${'commit' if len(branch_commits['commits']) == 1 else 'commits'} on branch: <${branch_commits['branch']['url']}|${branch_commits['branch']['name']}>
271 def branch_text(branch):
272 %for commit in branch_commits['commits']:
272 if branch:
273 return 'on branch: <{}|{}>'.format(branch_commits['branch']['url'], branch_commits['branch']['name'])
274 else:
275 ## case for SVN no branch push...
276 return 'to trunk'
277 %> \
278 % for branch, branch_commits in branches_commits.items():
279 ${len(branch_commits['commits'])} ${'commit' if len(branch_commits['commits']) == 1 else 'commits'} ${branch_text(branch)}
280 % for commit in branch_commits['commits']:
273 `<${commit['url']}|${commit['short_id']}>` - ${commit['message_html']|html_to_slack_links}
281 `<${commit['url']}|${commit['short_id']}>` - ${commit['message_html']|html_to_slack_links}
274 %endfor
282 % endfor
275 %endfor
283 % endfor
276 '''))
284 '''))
277
285
278 text = render_with_traceback(
286 text = render_with_traceback(
General Comments 0
You need to be logged in to leave comments. Login now