# HG changeset patch # User Marcin Kuzminski # Date 2017-03-02 11:05:09 # Node ID 966a4df8d891b7cd8d68b7b9bb57aeed09b4d89a # Parent 1047cf00a7f9e64068d1b4a7fbe2bc4b24a83b23 slack-integration: added number of commits inside the message. diff --git a/rhodecode/integrations/types/slack.py b/rhodecode/integrations/types/slack.py --- a/rhodecode/integrations/types/slack.py +++ b/rhodecode/integrations/types/slack.py @@ -263,7 +263,7 @@ class SlackIntegrationType(IntegrationTy 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