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

feat: add antham/gommit #20479

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

NikitaCOEUR
Copy link
Contributor

antham/gommit: Enforce git message commit consistency

$ aqua g -i antham/gommit

How to confirm if this package works well

Reviewers aren't necessarily familiar with this package, so please describe how to confirm if this package works well.
Please confirm if this package works well yourself as much as possible.

Prerequisites

Add a file .gommit.toml at root project (configure it for your commit rules)

[config]
exclude-merge-commits=true
check-summary-length=true
summary-length=50

[matchers]
all='^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)'

[examples]
a_simple_commit="""
[build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test](module): A commit message
"""
a_more_simple_commit="""
fix: take care with whitespace
"""

an_extended_commit="""
[build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test](module): A commit message

* first line
* second line
* and so on...
"""

Command and output

# Show version
$ gommit version
v2.9.0

# Test good commit message
$ gommit check message 'chore(module): simple commit'
Everything is ok

# Test bad commit message :
$ gommit check message 'chore(module):bad commit'
----

Message  : 
           chore(module):bad commit

Error(s) : - No template match commit message

=======

Your message must match one of those following patterns :

----

An extended commit : 

[build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test](module): A commit message

* first line
* second line
* and so on...

----

A simple commit : 

[build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test](module): A commit message

----

A more simple commit : 

fix: take care with whitespace

[antham/gommit](https://github.com/antham/gommit): Enforce git message commit consistency
@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Mar 1, 2024
@suzuki-shunsuke suzuki-shunsuke added this to the v4.146.1 milestone Mar 1, 2024
@suzuki-shunsuke
Copy link
Member

Thank you!

@suzuki-shunsuke suzuki-shunsuke merged commit 24f65ad into aquaproj:main Mar 1, 2024
16 checks passed
@suzuki-shunsuke
Copy link
Member

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

Successfully merging this pull request may close these issues.

None yet

2 participants