@@ -699,10 +699,10 @@ def _easyconfigs_pr_common(paths, start_branch=None, pr_branch=None, target_acco
699699 raise EasyBuildError ("Pushing branch '%s' to remote %s (%s) failed: empty result" ,
700700 pr_branch , my_remote , github_url )
701701
702- return file_info , patch_info , git_repo , pr_branch , diff_stat
702+ return file_info , git_repo , pr_branch , diff_stat
703703
704704
705- def scan_all_easyconfigs (patch_names ):
705+ def scan_all_easyconfigs (patch_name ):
706706 """
707707 Scan all easyconfigs in the robot path to determine which software a patch file belongs to
708708
@@ -756,7 +756,7 @@ def new_pr(paths, title=None, descr=None, commit_msg=None):
756756 raise EasyBuildError ("GitHub token for user '%s' must be available to use --new-pr" , github_user )
757757
758758 # create branch, commit files to it & push to GitHub
759- file_info , patch_info , git_repo , branch , diff_stat = _easyconfigs_pr_common (paths , pr_branch = pr_branch_name ,
759+ file_info , git_repo , branch , diff_stat = _easyconfigs_pr_common (paths , pr_branch = pr_branch_name ,
760760 target_account = pr_target_account ,
761761 commit_msg = commit_msg )
762762
@@ -771,7 +771,6 @@ def new_pr(paths, title=None, descr=None, commit_msg=None):
771771 class_label = ',' .join ([tc for (cnt , tc ) in classes_counted if cnt == classes_counted [- 1 ][0 ]])
772772
773773
774-
775774 if title is None :
776775 if file_info ['ecs' ]:
777776 # mention software name/version in PR title (only first 3)
@@ -783,11 +782,10 @@ def new_pr(paths, title=None, descr=None, commit_msg=None):
783782
784783 title = "{%s}[%s] %s" % (class_label , toolchain_label , main_title )
785784
786- elif patch_info ['files' ]:
787- if len (patch_info ['files' ]) <= 3 :
788- title = ', ' .join (patch_info ['files' ])
789- else :
790- title = ', ' .join (patch_info ['files' ][:3 ] + ['...' ])
785+ else :
786+ raise EasyBuildError ("Don't know how to make a PR title for this PR. "
787+ "Please include a title (use --pr-title)" )
788+
791789
792790 full_descr = "(created using `eb --new-pr`)\n "
793791 if descr is not None :
@@ -853,7 +851,7 @@ def update_pr(pr, paths, commit_msg=None):
853851 github_target = '%s/%s' % (pr_target_account , pr_target_repo )
854852 print_msg ("Determined branch name corresponding to %s PR #%s: %s" % (github_target , pr , branch ), log = _log )
855853
856- _ , _ , _ , _ , diff_stat = _easyconfigs_pr_common (paths , start_branch = branch , pr_branch = branch ,
854+ _ , _ , _ , diff_stat = _easyconfigs_pr_common (paths , start_branch = branch , pr_branch = branch ,
857855 target_account = account , commit_msg = commit_msg )
858856
859857 print_msg ("Overview of changes:\n %s\n " % diff_stat , log = _log , prefix = False )
0 commit comments