Skip to content

Commit 34d77e2

Browse files
authored
no --pr-commit-msg when only adding new files
1 parent 92d2968 commit 34d77e2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

easybuild/tools/github.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,9 @@ def _easyconfigs_pr_common(paths, ecs, start_branch=None, pr_branch=None, start_
848848

849849
# figure out commit message to use
850850
if commit_msg:
851+
if pr_target_repo == GITHUB_EASYCONFIGS_REPO and all(file_info['new']) and not paths['files_to_delete']:
852+
raise EasyBuildError("A PR commit msg (--pr-commit-msg) should not be used for the easyconfigs repo when "
853+
"adding new files. The PR title will be automatically generated.")
851854
cnt = len(file_info['paths_in_repo'])
852855
_log.debug("Using specified commit message for all %d new/modified files at once: %s", cnt, commit_msg)
853856
elif pr_target_repo == GITHUB_EASYCONFIGS_REPO and all(file_info['new']) and not paths['files_to_delete']:

0 commit comments

Comments
 (0)