semantic-release: Git pre-receive hook trigger when pushing Git notes
When we upgraded to v16 we started getting the following error in GitLab:
Commit message does not follow the pattern \'^(build|ci|docs|feat|fix|perf|refactor|style|test|chore)(\\([a-z]+\\)){0,1}:\
It looks like the new notes part is committing with a format that doesn’t follow the commit format, but I can’t see what the commit message is in the logs.
Have I missed a prefix or is something else wrong?
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 1
- Comments: 15 (4 by maintainers)
As a temporary workaround you may add the following sequence to your regex pattern
^(Notes added by \'git notes add\')
So it will match the refs convention
Looking forwards for a fix from GitLab team
I also have this issue, it would be really helpful if we could at least configure the commit message. We have a hook to check for jira tickets in the commits and it is failing too
Raised a GitLab issue, I’m going to try getting a test project setup for this as well. https://gitlab.com/gitlab-org/gitlab/issues/207807
I tried to do a bit of research but couldn’t find any information related to how Git notes should behave with commit hooks. Intuitively I would says notes should not trigger a commit hook, but I don’t know what is the intended behavior from the Git team perspective. I don’t know if it’s specific to GitLab either.
I would recommend to: