def generate_commit_message(repo, env='default', author=None):
"""Generates a generic commit message.
Args:
repo (git.objects.Repo): The git repository to commit against
env (str): The infrastructure you're bumping against
author (Optional[git.objects.Actor]): Commit author, host user by default
Returns:
str: The generated generic commit message
"""
author = author if author else helpers.get_host_author(repo)
return '\n'.join([
'chore(git): trigger deploy with empty commit',
'\n'
'committed-by: %s <%s>' % (author.name, author.email,),
'environment: %s' % (env,),
'\n'
'Committed via Mimiron v%s (https://github.com/ImageIntelligence/mimiron)' % (__version__,)
])
评论列表
文章目录