-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fixing @gitmoji/parser-opts to allow for - and / #674
Comments
what's your commit for example? |
` 💚 fix-ci(ci/cd): added release rules for all cz-emojis body text here ` |
I made the modification locally in my install of the @gitmoji/parser-opts, but this will probably not work with github action CI when it tries to install the original. o also I have an additional template hbs file for cz-emoji, as well as organized release rules for all 75 emoji types. I think it could be useful to have them as an additional default template inside the lib assets directory where the commit and default templates are. let me know if you would like a copy of them and I'll make a PR request. |
|
{{#if compareUrl}}
# [v{{nextRelease.version}}]({{compareUrl}}) ({{datetime "UTC:yyyy-mm-dd"}})
{{else}}
# v{{nextRelease.version}} ({{datetime "UTC:yyyy-mm-dd"}})
{{/if}}
{{#with commits}}
{{#if art}}
## 🎨 Improving structure / format of the code
{{#each art}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if zap}}
## ⚡️ Improving performance
{{#each zap}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if fire}}
## 🔥 Removing code or files
{{#each fire}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if bug}}
## 🐛 Fixing a bug
{{#each bug}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if ambulance}}
## 🚑 Critical hotfix
{{#each ambulance}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if sparkles}}
## ✨ Introducing new features
{{#each sparkles}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if pencil}}
## 📝 Writing docs
{{#each pencil}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if rocket}}
## 🚀 Deploying stuff
{{#each rocket}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if lipstick}}
## 💄 Updating the UI and style files
{{#each lipstick}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if tada}}
## 🎉 Initial commit
{{#each tada}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if white_check_mark}}
## ✅ Adding tests
{{#each white_check_mark}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if lock}}
## 🔒 Fixing security issues
{{#each lock}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if apple}}
## 🍎 Fixing something on macOS
{{#each apple}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if penguin}}
## 🐧 Fixing something on Linux
{{#each penguin}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if checkered_flag}}
## 🏁 Fixing something on Windows
{{#each checkered_flag}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if robot}}
## 🤖 Fixing something on Android
{{#each robot}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if green_apple}}
## 🍏 Fixing something on iOS
{{#each green_apple}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if bookmark}}
## 🔖 Releasing / Version tags
{{#each bookmark}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if rotating_light}}
## 🚨 Removing linter warnings
{{#each rotating_light}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if construction}}
## 🚧 Work in progress
{{#each construction}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if green_heart}}
## 💚 Fixing CI Build
{{#each green_heart}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if arrow_down}}
## ⬇️ Downgrading dependencies
{{#each arrow_down}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if arrow_up}}
## ⬆️ Upgrading dependencies
{{#each arrow_up}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if pushpin}}
## 📌 Pinning dependencies to specific versions
{{#each pushpin}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if construction_worker}}
## 👷 Adding CI build system
{{#each construction_worker}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if chart_with_upwards_trend}}
## 📈 Adding analytics or tracking code
{{#each chart_with_upwards_trend}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if recycle}}
## ♻️ Refactoring code
{{#each recycle}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if whale}}
## 🐳 Work about Docker
{{#each whale}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if heavy_plus_sign}}
## ➕ Adding a dependency
{{#each heavy_plus_sign}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if heavy_minus_sign}}
## ➖ Removing a dependency
{{#each heavy_minus_sign}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if wrench}}
## 🔧 Changing configuration files
{{#each wrench}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if globe_with_meridians}}
## 🌐 Internationalization and localization
{{#each globe_with_meridians}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if pencil2}}
## ✏️ Fixing typos
{{#each pencil2}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if poop}}
## 💩 Writing bad code that needs to be improved
{{#each poop}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if rewind}}
## ⏪ Reverting changes
{{#each rewind}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if twisted_rightwards_arrows}}
## 🔀 Merging branches
{{#each twisted_rightwards_arrows}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if package}}
## 📦 Updating compiled files or packages
{{#each package}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if alien}}
## 👽 Updating code due to external API changes
{{#each alien}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if truck}}
## 🚚 Moving or renaming files
{{#each truck}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if page_facing_up}}
## 📄 Adding or updating license
{{#each page_facing_up}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if boom}}
## 💥 Introducing breaking changes
{{#each boom}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if bento}}
## 🍱 Adding or updating assets
{{#each bento}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if ok_hand}}
## 👌 Updating code due to code review changes
{{#each ok_hand}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if wheelchair}}
## ♿️ Improving accessibility
{{#each wheelchair}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if bulb}}
## 💡 Documenting source code
{{#each bulb}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if beers}}
## 🍻 Writing code drunkenly
{{#each beers}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if speech_balloon}}
## 💬 Updating text and literals
{{#each speech_balloon}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if card_file_box}}
## 🗃️ Performing database related changes
{{#each card_file_box}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if loud_sound}}
## 🔊 Adding logs
{{#each loud_sound}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if mute}}
## 🔇 Removing logs
{{#each mute}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if busts_in_silhouette}}
## 👥 Adding contributor(s)
{{#each busts_in_silhouette}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if children_crossing}}
## 🚸 Improving user experience / usability
{{#each children_crossing}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if building_construction}}
## 🏗️ Making architectural changes
{{#each building_construction}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if iphone}}
## 📱 Working on responsive design
{{#each iphone}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if clown_face}}
## 🤡 Mocking things
{{#each clown_face}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if egg}}
## 🥚 Adding an easter egg
{{#each egg}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if see_no_evil}}
## 🙈 Adding or updating a .gitignore file
{{#each see_no_evil}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if camera_flash}}
## 📸 Adding or updating snapshots
{{#each camera_flash}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if alembic}}
## ⚗️ Experimenting new things
{{#each alembic}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if mag}}
## 🔍 Improving SEO
{{#each mag}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if wheel_of_dharma}}
## ☸️ Work about Kubernetes
{{#each wheel_of_dharma}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if label}}
## 🏷️ Adding or updating types (Flow, TypeScript)
{{#each label}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if seedling}}
## 🌱 Adding or updating seed files
{{#each seedling}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if triangular_flag_on_post}}
## 🚩 Adding, updating, or removing feature flags
{{#each triangular_flag_on_post}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if dizzy}}
## 💫 Adding or updating animations and transitions
{{#each dizzy}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if wastebasket}}
## 🗑️ Deprecate code that needs to be cleaned up
{{#each wastebasket}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if passport_control}}
## 🛂 Work on code related to authorization, roles and permissions
{{#each passport_control}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if adhesive_bandage}}
## 🩹 Simple fix for a non-critical issue
{{#each adhesive_bandage}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if monocle_face}}
## 🧐 Data exploration/inspection
{{#each monocle_face}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if coffin}}
## ⚰️ Remove dead code
{{#each coffin}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if test_tube}}
## 🧪 Add a failing test
{{#each test_tube}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if necktie}}
## 👔 Add or update business logic
{{#each necktie}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if stethoscope}}
## 🩺 Add or update healthcheck
{{#each stethoscope}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if bricks}}
## 🧱 Infrastructure related changes
{{#each bricks}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{#if technologist}}
## 🧑💻 Improve developer experience
{{#each technologist}}
- {{> commitTemplate}}
{{/each}}
{{/if}}
{{/with}} |
you can see all the types at this url here: |
I think add |
made the PR. |
deleted my first pull request and made a second one with an updated example of the regex101 link. Also added the bug emoji to the beginning of my commit message |
@arvinxx any update on this issue? |
I use types in the form of fix-ci and ci/cd, which doesn't get picked up by the regex \w* due to the - and / in-between the words
I propose changing (?\w*) to (?[a-zA-z-,/]+) on this line:
https://github.com/arvinxx/gitmoji-commit-workflow/blob/master/packages/parser-opts/src/index.ts#L10
so it becomes this
headerPattern: new RegExp("^(?:".concat(gitmojiCodeStr, "|(?:").concat(gitmojiUnicodeStr, ")|(?:").concat(emojiStr, "))\s(?[a-zA-z-,/]+)(?:\((?.)\))?!?:\s(?(?:(?!#).)(?:(?!\s).))(?:\s\(?(?#\d*)\)?)?$")),
The text was updated successfully, but these errors were encountered: