Show More
@@ -267,8 +267,16 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 | <% | |||
|
271 | def branch_text(branch): | |||
|
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 | %> \ | |||
270 | %for branch, branch_commits in branches_commits.items(): |
|
278 | % for branch, branch_commits in branches_commits.items(): | |
271 |
${len(branch_commits['commits'])} ${'commit' if len(branch_commits['commits']) == 1 else 'commits'} |
|
279 | ${len(branch_commits['commits'])} ${'commit' if len(branch_commits['commits']) == 1 else 'commits'} ${branch_text(branch)} | |
272 | %for commit in branch_commits['commits']: |
|
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 |
General Comments 0
You need to be logged in to leave comments.
Login now