from typing import Dict


def format_heading(
        git_web_url: str, branch_name: str, repo_name: str, commit_count: int
) -> Dict:
    """Return formatted heading as Slack's BlockKit section."""
    if commit_count > 1:
        suffix = 's'
    else:
        suffix = ''

    return {
        'type': 'section',
        'text': {
            'type': 'mrkdwn',
            'text': '<{}/tree/{}|[{}:{}]> {:d} commit{}'.format(
                git_web_url, branch_name, repo_name, branch_name, commit_count,
                suffix
            )
        }
    }