Skip to content

Conversation

josix
Copy link
Contributor

@josix josix commented Aug 3, 2020

Description

Update cz check --rev-range to show all ill-formatted commits when running batch checking

Checklist

(Not sure if I need to add test case and update the docs)

  • 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

All ill-formatted commits should be displayed when running cz check --rev-range

Steps to Test This Pull Request

  1. Go to any repo containing ill-formatted commits
  2. Run cz check --rev-range HEAD~10..HEAD to check if all ill-formatted commits in the range is displayed (HEAD~10..HEAD could be replaced with any valid argument)

Additional context

Solve Issue #175

@codecov
Copy link

codecov bot commented Aug 3, 2020

Codecov Report

Merging #244 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #244      +/-   ##
==========================================
+ Coverage   96.58%   96.60%   +0.01%     
==========================================
  Files          33       33              
  Lines         908      912       +4     
==========================================
+ Hits          877      881       +4     
  Misses         31       31              
Flag Coverage Δ
#unittests 96.60% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
commitizen/commands/bump.py 90.58% <ø> (ø)
commitizen/__version__.py 100.00% <100.00%> (ø)
commitizen/commands/check.py 100.00% <100.00%> (ø)
commitizen/cz/base.py 100.00% <0.00%> (ø)
commitizen/git.py 95.55% <0.00%> (+0.04%) ⬆️

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 d6e6eb5...829a4e6. Read the comment docs.

@josix josix marked this pull request as ready for review August 3, 2020 14:36
@woile woile requested a review from Lee-W August 4, 2020 11:31
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.

Hi, thanks for your contribution! I just left some comments. Could you please add some test cases as well? Thanks!

* Update _get_commit_messages to get_commits with rev and msg info
@josix josix requested a review from Lee-W August 5, 2020 18:56
@josix
Copy link
Contributor Author

josix commented Aug 5, 2020

Hello @Lee-W, thank you for your quickly review. I'll add unittests to this update these day. Thank you for your help.

@josix josix requested a review from Lee-W August 6, 2020 06:25
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.

Nice! Let's merge it!

@Lee-W Lee-W merged commit 0d5086e into commitizen-tools:master Aug 6, 2020
@josix
Copy link
Contributor Author

josix commented Aug 6, 2020

@Lee-W Thanks for your review! I learn a lot from 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.

2 participants