diff --git a/resources/git-hooks/prepare-commit-msg b/resources/git-hooks/prepare-commit-msg index 4fd7bdffea..0db32abff3 100755 --- a/resources/git-hooks/prepare-commit-msg +++ b/resources/git-hooks/prepare-commit-msg @@ -114,18 +114,25 @@ function prepend_scope() { fi fi + commentchar="#" + if [[ -n "$(git config core.commentString)" ]]; then + commentchar="$(git config core.commentString)" + elif [[ -n "$(git config core.commentChar)" ]]; then + commentchar="$(git config core.commentChar)" + fi + postfix=$( cat < -# - Use imperative, present tense ('attach' not 'attaches', 'attached' etc) -# - Don't include a period at the end of the title -# - Always include a blank line before trailers -# - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes +\n${commentchar} Keyman Conventional Commit suggestions: +${commentchar} +${commentchar} - Link to a Sentry issue with git trailer: +${commentchar} Fixes: _MODULE_-_ID_ +${commentchar} - Give credit to co-authors: +${commentchar} Co-authored-by: _Name_ <_email_> +${commentchar} - Use imperative, present tense ('attach' not 'attaches', 'attached' etc) +${commentchar} - Don't include a period at the end of the title +${commentchar} - Always include a blank line before trailers +${commentchar} - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes EOF ) @@ -170,4 +177,4 @@ case $COMMIT_SOURCE in # Known possibilities: message (-m), template (-t) exit 0 ;; -esac \ No newline at end of file +esac