Skip to content

Commit 799c3b4

Browse files
check if patch exists in repo
1 parent f25817b commit 799c3b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

easybuild/tools/github.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,10 +1783,10 @@ def new_pr(paths, ecs, title=None, descr=None, commit_msg=None):
17831783
res = new_branch_github(paths, ecs, commit_msg=commit_msg)
17841784
file_info, deleted_paths, _, branch_name, diff_stat, pr_target_repo = res
17851785

1786-
for ec in file_info['ecs']:
1786+
for ec, ec_path in zip(file_info['ecs'], file_info['paths_in_repo']):
17871787
for patch in ec.asdict()['patches']:
1788-
if patch not in paths['patch_files']:
1789-
print_warning("%s, referenced by %s, is not included in this PR" % (patch, ec.filename()))
1788+
if patch not in paths['patch_files'] and not os.path.isfile(os.path.join(os.path.dirname(ec_path), patch)):
1789+
print_warning("new patch %s, referenced by %s, is not included in this PR" % (patch, ec.filename()))
17901790

17911791
new_pr_from_branch(branch_name, title=title, descr=descr, pr_target_repo=pr_target_repo,
17921792
pr_metadata=(file_info, deleted_paths, diff_stat), commit_msg=commit_msg)

0 commit comments

Comments
 (0)