Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom types not matching as expected #260

Open
Indemnity83 opened this issue Apr 12, 2024 · 4 comments
Open

Custom types not matching as expected #260

Indemnity83 opened this issue Apr 12, 2024 · 4 comments

Comments

@Indemnity83
Copy link

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
@amannn
Copy link
Owner

amannn commented Apr 15, 2024

This might be a duplicate of #257

@Indemnity83
Copy link
Author

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

@amannn
Copy link
Owner

amannn commented Apr 19, 2024

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?

@buglavecz
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants