KEMBAR78
Add commitlint by mgrachev · Pull Request #347 · dotenv-linter/dotenv-linter · GitHub
Skip to content

Conversation

@mgrachev
Copy link
Member

@mgrachev mgrachev commented Nov 27, 2020

✔ Checklist:

Signed-off-by: Mikhail Grachev <work@mgrachev.com>
@mgrachev mgrachev force-pushed the add-commitlint branch 2 times, most recently from 1078d4d to ec0d1eb Compare November 27, 2020 16:23
@mgrachev mgrachev mentioned this pull request Nov 27, 2020
16 tasks
@mgrachev mgrachev added this to the v3.0.0 milestone Nov 27, 2020
@mgrachev mgrachev requested a review from a team November 27, 2020 16:29
Signed-off-by: Mikhail Grachev <work@mgrachev.com>
Copy link
Member

@mstruebing mstruebing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

What do you think about adding a commithook to already check this while commiting and not having to wait for the pipeline, if not commit with --no-verify?

@mgrachev
Copy link
Member Author

What do you think about adding a commithook to already check this while commiting and not having to wait for the pipeline, if not commit with --no-verify?

I didn't quite understand you. Can you give an example?

@mstruebing
Copy link
Member

A git hook is something that hooks into your git lifecycle. So for example, a pre-commit-hook for example will run exactly before you commit. It is a simple bash script which aborts the lifecycle if it exits with a non zero return value.

So you could run tests as a pre-commit hook and don't allow to commit if some tests fail for example.
You could skip the git hooks with git commit --no-verify, but you have to want to do it, it will not happen automatically.

In our case we would need a commit-msg hook. There are mostly a bunch of tools for every language available, to make this as easy usable as possible. But in general they are just bash script which are placed in the repository :.git/hooks/.

This is the first one I've found: https://github.com/swellaby/rusty-hook

That way, you could see that your commit message is wrong without having to wait for the github action pipelines to finish.

@mgrachev mgrachev merged commit 8bab595 into master Nov 28, 2020
@mgrachev mgrachev deleted the add-commitlint branch November 28, 2020 19:33
@mgrachev
Copy link
Member Author

Thank you! I will think about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants