only checks really submitted commits

This commit is contained in:
Benjamin Dauvergne 2019-08-06 17:02:07 +02:00
parent 10f7762ab4
commit bf27d15b45
1 changed files with 1 additions and 1 deletions

View File

@ -270,7 +270,7 @@ def submit(ctx, issue, no_rebase, number_of_commits):
api = get_redmine_api()
kwargs = {}
repo = get_repo()
for commit in get_commits(repo, 'master'):
for commit in list(get_commits(repo, 'master'))[:number_of_commits]:
if ('#%s' % get_current_issue()) not in commit.message:
click.echo(click.style('Missing commit number in commit message', fg='red'))
click.echo()