Skip to content

Commit 9246833

Browse files
committed
run 'git diff' against updated PR branch in new_pr_from_branch
1 parent 93a9d26 commit 9246833

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

easybuild/tools/github.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,11 @@ def new_pr_from_branch(branch_name, title=None, descr=None, pr_metadata=None):
13331333
git_repo.git.fetch(remote.name)
13341334
if pr_target_branch in [b.name for b in git_repo.branches]:
13351335
git_repo.delete_head(pr_target_branch, force=True)
1336-
git_repo.git.checkout('remotes/%s/%s' % (remote.name, pr_target_branch), track=True, force=True)
1336+
1337+
full_target_branch_ref = 'remotes/%s/%s' % (remote.name, pr_target_branch)
1338+
git_repo.git.checkout(full_target_branch_ref, track=True, force=True)
1339+
1340+
diff_stat = git_repo.git.diff(full_target_branch_ref, branch_name, stat=True)
13371341

13381342
print_msg("determining metadata for pull request based on changed files...", log=_log)
13391343

@@ -1387,8 +1391,6 @@ def new_pr_from_branch(branch_name, title=None, descr=None, pr_metadata=None):
13871391

13881392
file_info = det_file_info(ec_paths, target_dir)
13891393

1390-
diff_stat = git_repo.git.diff(pr_target_branch, branch_name, stat=True)
1391-
13921394
# label easyconfigs for new software and/or new easyconfigs for existing software
13931395
labels = []
13941396
if any(file_info['new_folder']):

0 commit comments

Comments
 (0)