Skip to content

Conversation

Lee-W
Copy link
Member

@Lee-W Lee-W commented Jul 14, 2020

Only Running cz commit, cz bump and cz changelog in a non git project will raise NotAGitProjectError
Other commands like cz --help will work now

#206

(Thanks for sending a pull request! Please fill in the following content to let us know better about this change.)

Types of changes

Please put an x in the box that applies

  • Bugfix

Description

Describe what the change is

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

Steps to Test This Pull Request

  1. Run cz --help, cz ls, cz example, cz info, cz init, cz version, cz check
  2. Run cz commit, cz bump, cz changelog

Expected behavior

  1. After running the first group (i.e. cz --help ) of commands, no error should be raised.
  2. After running the second group (i.e. cz commit ) of commands, no error should be raised.

Related Issue

#206

Additional context

Add any other context or screenshots about the pull request here.

Only Running `cz commit`, `cz bump` and `cz changelog` in a non git project will raise NotAGitProjectError
Other commands like `cz --help` will work now

#206
@codecov
Copy link

codecov bot commented Jul 14, 2020

Codecov Report

Merging #219 into master will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #219      +/-   ##
==========================================
+ Coverage   95.64%   95.69%   +0.05%     
==========================================
  Files          34       34              
  Lines         942      953      +11     
==========================================
+ Hits          901      912      +11     
  Misses         41       41              
Flag Coverage Δ
#unittests 95.69% <100.00%> (+0.05%) ⬆️
Impacted Files Coverage Δ
commitizen/commands/bump.py 91.66% <100.00%> (+0.20%) ⬆️
commitizen/commands/changelog.py 97.29% <100.00%> (+0.07%) ⬆️
commitizen/commands/commit.py 96.61% <100.00%> (+0.11%) ⬆️
commitizen/config/__init__.py 97.67% <100.00%> (ø)
commitizen/git.py 95.45% <100.00%> (+0.27%) ⬆️

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 3f91066...a2f4af2. Read the comment docs.

@Lee-W Lee-W requested a review from woile July 14, 2020 08:52
@woile
Copy link
Member

woile commented Jul 14, 2020

Fantastic!

@Lee-W Lee-W merged commit 2fdce2f into master Jul 14, 2020
@Lee-W Lee-W deleted the raise-not-a-git-error-in-git-related-command-only branch July 14, 2020 14:47
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