From bab90b059865a50b7ff3673858e56258ee39ef10 Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Thu, 2 Mar 2017 12:05:09 +0100 Subject: [PATCH] slack-integration: added number of commits inside the message. --- rhodecode/integrations/types/slack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rhodecode/integrations/types/slack.py b/rhodecode/integrations/types/slack.py index 572e189f..4405399b 100644 --- a/rhodecode/integrations/types/slack.py +++ b/rhodecode/integrations/types/slack.py @@ -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