Skip to content

Conversation

yuukidach
Copy link
Contributor

@yuukidach yuukidach commented Dec 15, 2021

fix #455

Description

Currently cz check will also check comment in git commit message (mentioned in issue #455). This PR add a filter to remove those comment lines in git commit message.

Checklist

  • Add test cases to all the changes you introduce
  • Run ./script/format and ./script/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Expected behavior

Comment in git commit message will be ignored.

Steps to Test This Pull Request

  1. Create a commit message file with comments in it (see cz check does not ignore comments #455)
  2. Run cz check --commit-msg-file <just_created_file>

Additional context

@codecov
Copy link

codecov bot commented Dec 16, 2021

Codecov Report

Merging #462 (ba1afeb) into master (48f9b7e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #462   +/-   ##
=======================================
  Coverage   97.96%   97.97%           
=======================================
  Files          39       39           
  Lines        1424     1431    +7     
=======================================
+ Hits         1395     1402    +7     
  Misses         29       29           
Flag Coverage Δ
unittests 97.97% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
commitizen/__version__.py 100.00% <100.00%> (ø)
commitizen/commands/check.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6ddd68d...ba1afeb. Read the comment docs.

Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

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

@yuukidach Thanks for your contribution! @woile I'm good with this feature. Could you please check? Thanks!

@woile
Copy link
Member

woile commented Dec 19, 2021

LGTM

@Lee-W Lee-W merged commit b46e403 into commitizen-tools:master Dec 20, 2021
@yuukidach yuukidach deleted the feat/filter-comment-msg branch December 23, 2021 06:16
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.

cz check does not ignore comments
3 participants