-
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: filter search for commit change type #1381
base: master
Are you sure you want to change the base?
feat: filter search for commit change type #1381
Conversation
4dd1521
to
5c52c3d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1381 +/- ##
==========================================
+ Coverage 97.33% 97.51% +0.17%
==========================================
Files 42 57 +15
Lines 2104 2655 +551
==========================================
+ Hits 2048 2589 +541
- Misses 56 66 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
"use_search_filter": True, | ||
"use_jk_keys": False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know whether we should set it as the default, probably not for v4. I would suggest making it configurable. Also, this now only works for conventional_commits
, we would like it to work for all cz rules. Following up with this discussion, we probably could make the whole questionary behavior configurable, but that could be another PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review! I will modify the search function to work for all cz rules. As for making it configurable, we can open another issue for that. Does that sound good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably say we should make it configurable first to retain the current behavior and let those who want to play with it opt in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Lee-W,
I have tested the search filter functionality using the configuration approach:
[[tool.commitizen.customize.questions]]
type = "list"
name = "change_type"
message = "Select the type of change you are committing"
use_search_filter = true
use_jk_keys = false
It works as expected, so I've:
- Removed the modifications to conventional_commits.py
- Added documentation for the feature in customization.md
- Added test cases to verify the functionality
The search filter can now be enabled through configuration without modifying the core code.
5c52c3d
to
2f233d8
Compare
Description
Added search filter functionality to commit type selection in Conventional Commits. This allows users to quickly find commit types by typing part of the type name or description, enhancing user experience especially when working with many commit types.
Changes Made
Checklist
poetry all
locally to ensure this change passes linter check and testExpected behavior
When a user types characters during commit type selection, the list of options is filtered to show only those containing the typed characters. For example, typing "fix" will show the item that contains "fix" .
Steps to Test This Pull Request
Additional context