commitizen-tools / commitizen

Create committing rules for projects :rocket: auto bump versions :arrow_up: and auto changelog generation :open_file_folder:
https://commitizen-tools.github.io/commitizen/
MIT License
2.55k stars 266 forks source link

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

Closed josix closed 1 month ago

josix commented 1 month ago

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

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
codecov[bot] commented 1 month ago

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 ```diff @@ 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](https://app.codecov.io/gh/commitizen-tools/commitizen/pull/1262/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/commitizen-tools/commitizen/pull/1262/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `97.61% <92.59%> (+0.27%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more.

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