MCPcopy Create free account
hub / github.com/apache/arrow / get_primary_author

Function get_primary_author

dev/merge_arrow_pr.py:529–548  ·  view source on GitHub ↗
(cmd, distinct_authors)

Source from the content-addressed store, hash-verified

527
528
529def get_primary_author(cmd, distinct_authors):
530 author_pat = re.compile(r'(.*) <(.*)>')
531
532 while True:
533 primary_author = cmd.prompt(
534 "Enter primary author in the format of "
535 "\"name <email>\" [%s]: " % distinct_authors[0])
536
537 if primary_author == "":
538 return distinct_authors[0], distinct_authors[1:]
539
540 if author_pat.match(primary_author):
541 break
542 print(f'Bad author "{primary_author}", please try again')
543
544 # When primary author is specified manually, de-dup it from
545 # author list and put it at the head of author list.
546 distinct_other_authors = [x for x in distinct_authors
547 if x != primary_author]
548 return primary_author, distinct_other_authors
549
550
551def prompt_for_fix_version(cmd, issue, maintenance_branches=()):

Callers 1

mergeMethod · 0.85

Calls 1

promptMethod · 0.45

Tested by

no test coverage detected