@@ -1097,11 +1097,16 @@ def _easyconfigs_pr_common(paths, ecs, start_branch=None, pr_branch=None, start_
10971097 elif pr_target_repo == GITHUB_EASYBLOCKS_REPO and all (file_info ['new' ]):
10981098 commit_msg = "adding easyblocks: %s" % ', ' .join (os .path .basename (p ) for p in file_info ['paths_in_repo' ])
10991099 else :
1100- raise EasyBuildError (
1101- "A meaningful commit message must be specified via --pr-commit-msg when "
1102- "modifying/deleting files or targeting the framework repo." ,
1103- exit_code = EasyBuildExit .OPTION_ERROR
1104- )
1100+ msg = ''
1101+ modified_files = [os .path .basename (p ) for new , p in zip (file_info ['new' ], file_info ['paths_in_repo' ])
1102+ if not new ]
1103+ if modified_files :
1104+ msg += '\n Modified: ' + ', ' .join (modified_files )
1105+ if paths ['files_to_delete' ]:
1106+ msg += '\n Deleted: ' + ', ' .join (paths ['files_to_delete' ])
1107+ raise EasyBuildError ("A meaningful commit message must be specified via --pr-commit-msg when "
1108+ "modifying/deleting files or targeting the framework repo." + msg ,
1109+ exit_code = EasyBuildExit .OPTION_ERROR )
11051110
11061111 # figure out to which software name patches relate, and copy them to the right place
11071112 if paths ['patch_files' ]:
@@ -1144,8 +1149,8 @@ def _easyconfigs_pr_common(paths, ecs, start_branch=None, pr_branch=None, start_
11441149 # only consider new easyconfig files for dependencies (not updated ones)
11451150 for idx in range (len (all_dep_info ['ecs' ])):
11461151 if all_dep_info ['new' ][idx ]:
1147- for key , values in dep_info .items ():
1148- values .append (all_dep_info [key ][idx ])
1152+ for key , info in dep_info .items ():
1153+ info .append (all_dep_info [key ][idx ])
11491154
11501155 # checkout target branch
11511156 if pr_branch is None :
@@ -1788,7 +1793,7 @@ def post_pr_labels(pr, labels):
17881793
17891794 pr_url = g .repos [pr_target_account ][pr_target_repo ].issues [pr ]
17901795 try :
1791- status , data = pr_url .labels .post (body = labels )
1796+ status , _ = pr_url .labels .post (body = labels )
17921797 if status == HTTP_STATUS_OK :
17931798 print_msg ("Added labels %s to PR#%s" % (', ' .join (labels ), pr ), log = _log , prefix = False )
17941799 return True
@@ -2104,13 +2109,11 @@ def new_pr(paths, ecs, title=None, descr=None, commit_msg=None):
21042109 patch = patch [0 ]
21052110 elif isinstance (patch , dict ):
21062111 patch_info = {}
2107- for key in patch .keys ():
2108- patch_info [key ] = patch [key ]
2109- if 'name' not in patch_info .keys ():
2110- raise EasyBuildError (
2111- "Wrong patch spec '%s', when using a dict 'name' entry must be supplied" , str (patch ),
2112- exit_code = EasyBuildExit .EASYCONFIG_ERROR
2113- )
2112+ for key , cur_patch in patch .items ():
2113+ patch_info [key ] = cur_patch
2114+ if 'name' not in patch_info :
2115+ raise EasyBuildError (f"Wrong patch spec '{ patch } ', when using a dict 'name' entry must be supplied" ,
2116+ exit_code = EasyBuildExit .EASYCONFIG_ERROR )
21142117 patch = patch_info ['name' ]
21152118
21162119 if patch not in paths ['patch_files' ] and not os .path .isfile (os .path .join (os .path .dirname (ec_path ),
0 commit comments