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(init)!: add prepare-commit-msg hook #13

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

welpo
Copy link
Owner

@welpo welpo commented Feb 9, 2024

Summary

  • Add --init prepare-commit-msg to create a prepare-commit-msg hook. This hook uses the hidden --prepare-commit-message flag to prepend the description of enabled rules to the commit message template.
  • Renames --init hook to --init commit-msg
  • Adds --init hooks option to initialize both hooks.

BREAKING CHANGE: --init hook has been replaced by --init commit-msg.


How has this been tested?

  • Manual tests
  • Unit tests
  • Integration tests

Type of change

  • Bug fix (fixes an issue without altering functionality)
  • New feature (adds non-breaking functionality)
  • Breaking change (alters existing functionality)
  • UI/UX improvement (enhances user interface without altering functionality)
  • Refactor (improves code quality without altering functionality)
  • Documentation update
  • Other (please describe below)

Checklist

  • I have read the contributing guidelines.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code follows the code style of this project.
  • I have formatted the code with cargo fmt.
  • My change requires updating the documentation.
  • I have updated the documentation accordingly.

@welpo welpo force-pushed the feat/prepare-commit-msg-hook branch from 14d31e0 to f045bbe Compare February 9, 2024 17:48
@welpo welpo added the enhancement New feature or request label Feb 9, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (9041419) 95.83% compared to head (f045bbe) 96.50%.

Files Patch % Lines
src/config.rs 98.80% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #13      +/-   ##
==========================================
+ Coverage   95.83%   96.50%   +0.66%     
==========================================
  Files          10       10              
  Lines         624      686      +62     
==========================================
+ Hits          598      662      +64     
+ Misses         26       24       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

BREAKING CHANGE: `--init hook` has been replaced by `--init commit-msg`.
@welpo welpo force-pushed the feat/prepare-commit-msg-hook branch from f045bbe to 3214059 Compare February 9, 2024 17:58
@welpo welpo merged commit 1ebd6ca into main Feb 9, 2024
14 checks passed
@welpo welpo deleted the feat/prepare-commit-msg-hook branch February 9, 2024 18:15
welpo added a commit that referenced this pull request Feb 9, 2024
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.

2 participants