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

chore: add commit msg git hook #750

Merged
merged 1 commit into from
Jun 24, 2022
Merged

Conversation

imxw
Copy link
Member

@imxw imxw commented Jun 24, 2022

Signed-off-by: xuwu ixw1991@126.com

Pre-Checklist

Note: please complete ALL items in the following checklist.

  • I have read through the CONTRIBUTING.md documentation.
  • My code has the necessary comments and documentation (if needed).
  • I have added relevant tests

Description

  • The hook is triggered when the user submits a commit, detecting whether the commit message conforms to the specification, and if not, outputting a help message
  • Automatic signature
  • Automatically copy git hooks when executing make

Related Issues

Closes #749

New Behavior (screenshots if needed)

Mac ( M1 )

image

image

image

Mac ( Intel )

xx:code bing$ uname -smp
Darwin x86_64 i386
xx:code bing$ git commit -m "justfortest"

    Error! The commit message should be structured as follows:

    <type>[optional scope]: <description>
    [optional body]
    [optional footer(s)]
  
    where "type" can be: feat fix doc docs chore ci build perf style revert test
    For details, please refer to https://www.conventionalcommits.org/en/v1.0.0/#summary

xx:code bing$ git commit -m "test: test"
[master (root-commit) 6c39cdb] test: test
 1 file changed, 1 insertion(+)
 create mode 100644 readme
xx:code bing$ git log -n1
commit 6c39cdb762ca6acd6f81e7127cc28b11c92e8232 (HEAD -> master)
Author: xxx <xxxx@qq.com>
Date:   Fri Jun 24 12:42:06 2022 +0800

    test: test

    Signed-off-by: xx <xxxxxx@qq.com>

Windows

image

image

Signed-off-by: xuwu <ixw1991@126.com>
@imxw imxw requested a review from daniel-hutao as a code owner June 24, 2022 07:58
@IronCore864
Copy link
Member

A great PR, thanks for the contribution! @imxw

BTW, I have assigned the issue to you. Please always do this when you decide to work on an issue so that others know it's already taken and won't do duplicated work :)

@IronCore864 IronCore864 merged commit 6e096a7 into devstream-io:main Jun 24, 2022
@imxw
Copy link
Member Author

imxw commented Jun 24, 2022

A great PR, thanks for the contribution! @imxw

BTW, I have assigned the issue to you. Please always do this when you decide to work on an issue so that others know it's already taken and won't do duplicated work :)

Got it! 😊

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

Successfully merging this pull request may close these issues.

🍀 Proposal: add commit message git hook
2 participants