Skip to content

Conversation

@josix
Copy link
Contributor

@josix josix commented Oct 15, 2024

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

  • Add test cases to all the changes you introduce
  • Run ./scripts/format and ./scripts/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

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
Copy link

codecov bot commented Oct 15, 2024

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 ⚠️
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%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@josix josix force-pushed the feat/commit/allow-force-edit-after-prompting branch 4 times, most recently from 30409a4 to 9898d3e Compare October 15, 2024 12:24
@josix josix marked this pull request as ready for review October 15, 2024 12:28
@josix josix changed the title feat(commands/commit): add force-edit functionality after answering questions feat(commands/commit): add manual-edit functionality after answering questions Oct 16, 2024
@josix josix force-pushed the feat/commit/allow-force-edit-after-prompting branch from 0142443 to 9b42049 Compare October 16, 2024 03:32
@josix josix requested a review from Lee-W October 16, 2024 03:32
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.

Left one nit, but mostly looks good!

@Lee-W Lee-W added pr-status: ready-to-merge almost ready to merge. just keep it for a few days for others to check and removed pr-status: wait-for-review labels Oct 20, 2024
…uestions

refactor: remove redundant return None

Co-authored-by: Wei Lee <weilee.rx@gmail.com>

Update test_commit_command.py

Co-authored-by: Wei Lee <weilee.rx@gmail.com>
@josix josix force-pushed the feat/commit/allow-force-edit-after-prompting branch 2 times, most recently from f73d452 to 513f86a Compare October 21, 2024 02:41
@Lee-W Lee-W merged commit 08a259d into commitizen-tools:master Oct 23, 2024
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-status: ready-to-merge almost ready to merge. just keep it for a few days for others to check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants