def git_errors_message(git_info):
    """Format a list of any git errors to send as slack message"""
    git_msg = [
        {
            "color": "#f2c744", "blocks": [
                {
                    "type": "divider"
                },
                {
                    "type": "section", "text": {"type": "mrkdwn", "text": ":github: *Git errors*"}
                }
            ]
        }
    ]
    for item in git_info:
        name = item['branch']
        info = item['error']
        git_info = [
            {					
                "type": "section", "text": {"type": "mrkdwn", "text": f"error pushing branch: {name} ```{info}```"}
            }
        ]
        git_msg[0]['blocks'].extend(git_info)
    return git_msg