di-sukharev / opencommit

Generate conventional git commit messages with AI in 1 second 🤯🔫
https://www.npmjs.com/package/opencommit
MIT License
5.98k stars 318 forks source link

[Feature]: Add prefix option for commit messages #152

Open codebydant opened 1 year ago

codebydant commented 1 year ago

Description

Hi @di-sukharev,

Thanks for this wonderful tool.

It would be great to have the option to define a custom prefix message for the commits.

Suggested Solution

Something like:

custom-message: JIRA#
custom-message: AB#
custom-message: GI#

Alternatives

Additional Context

This will allow us to pass the commit message validator in our CI pipelines. For e.g. in our team, we use Azure Board for defining commit messages.

AB#0 feat(back): add new backend module

Since this tool is already using the conventional commits standard, would be great to have an option to include our specific project prefix in the tool.

di-sukharev commented 1 year ago

that's smart, would you like to make a PR?

amitayk commented 1 year ago

Great idea! Perhaps allow for regex-based or static prefixes?

For example, my work follows this standard:

Branch name: DEV-12345-fix-broken-pipe, where 12345 is the Jira ticket number. Each commit must start with the prefix DEV-12345:.

If I were to create a PR that allows for static or regex-based commit message prefixes, would this be useful to anyone? 😅 @di-sukharev

codebydant commented 1 year ago

@amyu98 sounds really powerful.

amitayk commented 1 year ago

@dtcMLOps Ill give it a shot

amitayk commented 1 year ago

@dtcMLOps @di-sukharev

https://github.com/di-sukharev/opencommit/pull/160

First time contributing to open-source, let me know what you think 😅

github-actions[bot] commented 1 year ago

Stale issue message