extensions.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:mimiron 作者: ImageIntelligence 项目源码 文件源码
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__,)
    ])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号