slack-integration: added number of commits inside the message.

This commit is contained in:
Marcin Kuzminski 2017-03-02 12:05:09 +01:00
parent 7dd3a63a11
commit bab90b0598

View file

@ -263,7 +263,7 @@ class SlackIntegrationType(IntegrationTypeBase):
repo_push_template = Template(textwrap.dedent(r'''
%for branch, branch_commits in branches_commits.items():
branch: <${branch_commits['branch']['url']}|${branch_commits['branch']['name']}>
${len(branch_commits['commits'])} ${'commit' if len(branch_commits['commits']) == 1 else 'commits'} on branch: <${branch_commits['branch']['url']}|${branch_commits['branch']['name']}>
%for commit in branch_commits['commits']:
`<${commit['url']}|${commit['short_id']}>` - ${commit['message_html_title']|html_to_slack_links}
%endfor