Allow primary author to be overridden during merge

This is useful when multiple people work on a feature and
the automatically chosen default is not the most appropriate
one.

Adapted from:
bc24289f5d
228ab65a4e
This commit is contained in:
Ismael Juma 2015-07-21 10:12:13 +01:00
parent b30982985e
commit ac06347e04
1 changed files with 6 additions and 1 deletions

View File

@ -130,7 +130,12 @@ def merge_pr(pr_num, target_ref, title, body, pr_repo_desc):
'--pretty=format:%an <%ae>']).split("\n")
distinct_authors = sorted(set(commit_authors),
key=lambda x: commit_authors.count(x), reverse=True)
primary_author = distinct_authors[0]
primary_author = raw_input(
"Enter primary author in the format of \"name <email>\" [%s]: " %
distinct_authors[0])
if primary_author == "":
primary_author = distinct_authors[0]
commits = run_cmd(['git', 'log', 'HEAD..%s' % pr_branch_name,
'--pretty=format:%h [%an] %s']).split("\n\n")