Skip to content

Commit 4c4a6a6

Browse files
committed
Only check for --new-pr for patches in teh easyconfigs repository
1 parent f5ea74a commit 4c4a6a6

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

easybuild/tools/github.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,13 +1783,15 @@ 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, ec_path in zip(file_info['ecs'], file_info['paths_in_repo']):
1787-
for patch in ec.asdict()['patches']:
1788-
if isinstance(patch, tuple):
1789-
patch = patch[0]
1790-
if patch not in paths['patch_files'] and not os.path.isfile(os.path.join(os.path.dirname(ec_path), patch)):
1791-
print_warning("new patch file %s, referenced by %s, is not included in this PR" %
1792-
(patch, ec.filename()))
1786+
if pr_target_repo == GITHUB_EASYCONFIGS_REPO:
1787+
for ec, ec_path in zip(file_info['ecs'], file_info['paths_in_repo']):
1788+
for patch in ec.asdict()['patches']:
1789+
if isinstance(patch, tuple):
1790+
patch = patch[0]
1791+
if patch not in paths['patch_files'] and not os.path.isfile(os.path.join(os.path.dirname(ec_path),
1792+
patch)):
1793+
print_warning("new patch file %s, referenced by %s, is not included in this PR" %
1794+
(patch, ec.filename()))
17931795

17941796
new_pr_from_branch(branch_name, title=title, descr=descr, pr_target_repo=pr_target_repo,
17951797
pr_metadata=(file_info, deleted_paths, diff_stat), commit_msg=commit_msg)

0 commit comments

Comments
 (0)