commitizen icon indicating copy to clipboard operation
commitizen copied to clipboard

feat(commands/commit): add manual-edit functionality after answering questions

Open josix opened this issue 1 year ago • 1 comments

Description

Add one argument -e/--edit to commit command, to allow user to continue editing after filling up all the questions. (Kudos to @MrMino! The pytest-edit project inspired me to come up with this idea.)

Checklist

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

Expected behavior

if -e/--edit enabled, the terminal would pop up editor with commit message after finishing the answering.

Steps to Test This Pull Request

  1. check out to this branch
  2. make a commit with cz c -e

josix avatar Oct 15 '24 11:10 josix

Codecov Report

Attention: Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.

Project coverage is 97.61%. Comparing base (120d514) to head (f73d452). Report is 461 commits behind head on master.

Files with missing lines Patch % Lines
commitizen/commands/commit.py 90.90% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1262      +/-   ##
==========================================
+ Coverage   97.33%   97.61%   +0.27%     
==========================================
  Files          42       55      +13     
  Lines        2104     2602     +498     
==========================================
+ Hits         2048     2540     +492     
- Misses         56       62       +6     
Flag Coverage Δ
unittests 97.61% <92.59%> (+0.27%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 15 '24 11:10 codecov[bot]