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(cli): add support for --edit and pre-commit #174

Merged
merged 3 commits into from
Sep 22, 2023

Conversation

cylewitruk
Copy link
Contributor

@cylewitruk cylewitruk commented Sep 21, 2023

I wanted to use this together with pre-commit but noticed that support for --edit was missing, so I went ahead and added at least the default using ./.git/COMMIT_EDITMSG.

Also added a .pre-commit-hooks.yaml so that the repo can be used together with pre-commit. Nothing fancy here...

And, thanks for this! Much better than the node commitlint solution for rust projects :)

Copy link
Owner

@KeisukeYamashita KeisukeYamashita left a comment

Choose a reason for hiding this comment

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

Thank you for your PR!
Overall LGTM, I found a typo 🙏

src/args.rs Outdated Show resolved Hide resolved
cylewitruk and others added 2 commits September 22, 2023 06:07
Co-authored-by: KeisukeYamashita <19yamashita15@gmail.com>
@KeisukeYamashita KeisukeYamashita changed the title task: add support for --edit and pre-commit feat(cli): add support for --edit and pre-commit Sep 22, 2023
Copy link
Owner

@KeisukeYamashita KeisukeYamashita left a comment

Choose a reason for hiding this comment

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

Thank you for your update!

@KeisukeYamashita KeisukeYamashita merged commit cfa41fc into KeisukeYamashita:main Sep 22, 2023
16 of 17 checks passed
@cylewitruk
Copy link
Contributor Author

cylewitruk commented Sep 22, 2023

Thank you for your update!

No problem :)

Once you create a new release (v.0.1.3), here's an example .pre-commit-config.yaml which can be used with pre-commit in case you wanted to add it to docs :)

default_install_hook_types: [pre-commit, commit-msg, prepare-commit-msg]
repos:
- repo: https://github.com/KeisukeYamashita/commitlint-rs
  rev: v0.1.3
  hooks:
  - id: commitlint

After that, a simple pre-commit install will download and build commitlint-rs and run cargo install on it, and add the hook to ./git/hooks.

@KeisukeYamashita
Copy link
Owner

@cylewitruk Sorry for the late reply 🙏
Thanks, I'll update the doc 😄

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.

None yet

2 participants