action-semantic-pull-request
action-semantic-pull-request copied to clipboard
Custom types not matching as expected
Describe the bug
I defined custom types that include an emoji, but when I run the action the validation fails even though the PR title uses one of the type options and it is unclear why the workflow doesn't think it matches.
To reproduce
Setup custom types with emoji's:
with:
types: |
โจ feat
๐ fix
๐ docs
๐ style
โป๏ธ refactor
๐ perf
๐งช test
๐๏ธ build
๐ฆ ci
๐งน chore
โช๏ธ revert
Generate a PR with one of these types in the title "๐ฆ ci: run tests"
Expected behavior
I'd expect this to pass validation, but it fails with the following message:
No release type found in pull request title "๐ฆ ci: run tests". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/
Available types:
- โจ feat
- ๐ fix
- ๐ docs
- ๐ style
- โป๏ธ refactor
- ๐ perf
- ๐งช test
- ๐๏ธ build
- ๐ฆ ci
- ๐งน chore
- โช๏ธ revert
This might be a duplicate of https://github.com/amannn/action-semantic-pull-request/issues/257
Digging a bit deeper, it looks like an issue with the regex used by conventional-commit-parser. It expects a single word.
/^(\w*)(?:(([\w$.-* ])))?: (.)$/
That library also appears to be 8 years without an update so not much point in trying to fix that.
Possibly, would need to replace that library with something like https://commitlint.js.org/api/lint
That library also appears to be 8 years without an update so not much point in trying to fix that.
conventional-commits-parser
? It looks actively maintained to me, no?
Hi. The latest version 6.0.0, but you used the 3.2.x version. I have a same problem, i try use gitmoji icons before commit types, but I try header regexp config change, it is doesn't works.