Skip to content

Commit

Permalink
no --pr-commit-msg when only adding new files
Browse files Browse the repository at this point in the history
  • Loading branch information
branfosj authored Apr 4, 2024
1 parent 92d2968 commit 34d77e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions easybuild/tools/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,9 @@ def _easyconfigs_pr_common(paths, ecs, start_branch=None, pr_branch=None, start_

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

0 comments on commit 34d77e2

Please sign in to comment.