-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
[BUG] Crash if commit starts with '*' #76
Comments
AthAshino
pushed a commit
to AthAshino/semantic-release-gitmoji
that referenced
this issue
Aug 4, 2023
AthAshino
pushed a commit
to AthAshino/semantic-release-gitmoji
that referenced
this issue
Aug 4, 2023
AthAshino
pushed a commit
to AthAshino/semantic-release-gitmoji
that referenced
this issue
Aug 4, 2023
AthAshino
added a commit
to AthAshino/semantic-release-gitmoji
that referenced
this issue
Aug 4, 2023
AthAshino
added a commit
to AthAshino/semantic-release-gitmoji
that referenced
this issue
Aug 8, 2023
AthAshino
added a commit
to AthAshino/semantic-release-gitmoji
that referenced
this issue
Aug 8, 2023
This was referenced Dec 22, 2023
🎉 This issue has been resolved in version 1.6.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I tried to use semantic-release-gitmoji today and had this exception:
An error occurred while running semantic-release: SyntaxError: Invalid regular expression: /^*/: Nothing to repeat
After searching a bit, I found that this commit was the source of the exception:
*Merge branch 'main' of ssh://GIT_URL into main
The problem seems to be due to the emojiRegex. The regex returns "*" which lead to a bad regex for this line:
subject = subject.replace(new RegExp('^' + gitmoji), '')
Global workflow:
const matched = emojiRegex().exec(subject)
subject = *Merge branch 'main' of ssh://GIT_URL into mainif (!matched || matched.index !== 0) return null
const gitmoji = matched[0]
gitmoji = *const semver = gitmojis.find(matchEmoji(gitmoji))?.semver || 'other'
subject = subject.replace(new RegExp('^' + gitmoji), '')
The text was updated successfully, but these errors were encountered: