Skip to content

Commit 68f9650

Browse files
authored
Merge pull request #4498 from branfosj/no-pr-commit-msg
no `--pr-commit-msg` when only adding new files
2 parents 7ecec06 + 50d7f82 commit 68f9650

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

easybuild/tools/github.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,14 @@ def _easyconfigs_pr_common(paths, ecs, start_branch=None, pr_branch=None, start_
11251125

11261126
# figure out commit message to use
11271127
if commit_msg:
1128+
if pr_target_repo == GITHUB_EASYCONFIGS_REPO and all(file_info['new']) and not paths['files_to_delete']:
1129+
msg = "When only adding new easyconfigs usually a PR commit msg (--pr-commit-msg) should not be used, as "
1130+
msg += "the PR title will be automatically generated."
1131+
if build_option('force'):
1132+
print_msg(msg)
1133+
print_msg("Using the specified --pr-commit-msg as the force build option was specified.")
1134+
else:
1135+
raise EasyBuildError(msg)
11281136
cnt = len(file_info['paths_in_repo'])
11291137
_log.debug("Using specified commit message for all %d new/modified files at once: %s", cnt, commit_msg)
11301138
elif pr_target_repo == GITHUB_EASYCONFIGS_REPO and all(file_info['new']) and not paths['files_to_delete']:

0 commit comments

Comments
 (0)