From 4479ddcb12b6f300913e4f1eaa8d09de62c932e2 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 11 Mar 2019 16:26:09 +0100 Subject: [PATCH] On merge-and-push add list of commits to issue --- git_redmine.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/git_redmine.py b/git_redmine.py index 8f9f735..5be2e57 100644 --- a/git_redmine.py +++ b/git_redmine.py @@ -358,9 +358,12 @@ def merge_and_push(issue, target_branch): except IndexError: raise click.UsageError('%r is not a local branch.' % target_branch) + notes = '
%s
' % repo.git.log('%s..' % target_branch) + click.echo(notes) for commit in get_commits(repo, target_branch): if 'rebase' in commit.message: - click.echo('Commit %s contains the word rebase :' % commit.hexsha[:8]) + click.echo() + click.echo('Commit %s contains the word "rebase" :' % commit.hexsha[:8]) click.echo() click.echo(''.join([' ' + line for line in commit.message.splitlines()])) click.echo() @@ -449,7 +452,7 @@ def merge_and_push(issue, target_branch): issue.assigned_to_id = current_user.id issue.save() kwargs['status_id'] = api.resolu_a_deployer.id - api.issue.update(issue.id, **kwargs) + api.issue.update(issue.id, notes=notes, **kwargs) @redmine.command(name='rebase')