test: add test coverage for positional commit_msg_file argument#367
Merged
shenxianpeng merged 2 commits intofix/add-commit-msg-filefrom Feb 3, 2026
Merged
test: add test coverage for positional commit_msg_file argument#367shenxianpeng merged 2 commits intofix/add-commit-msg-filefrom
shenxianpeng merged 2 commits intofix/add-commit-msg-filefrom
Conversation
Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
|
Copilot
AI
changed the title
[WIP] Fix commit message file argument support for pre-commit
test: add test coverage for positional commit_msg_file argument
Feb 3, 2026
shenxianpeng
approved these changes
Feb 3, 2026
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## fix/add-commit-msg-file #367 +/- ##
===========================================================
+ Coverage 94.40% 94.65% +0.24%
===========================================================
Files 9 9
Lines 805 805
===========================================================
+ Hits 760 762 +2
+ Misses 45 43 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
shenxianpeng
added a commit
that referenced
this pull request
Feb 3, 2026
* feat: add support for commit message file argument for pre-commit compatibility * fix: refactor commit message handling * fix: accept both hyphen and underscore formats for CLI args * Revert "fix: accept both hyphen and underscore formats for CLI args" This reverts commit 732bbda. * fix: Update commit_check/main.py per review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * test: add test coverage for positional commit_msg_file argument (#367) --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The positional
commit_msg_fileargument added in PR #366 lacked explicit test coverage for its core use cases and edge cases.Changes
Added test class
TestPositionalArgumentFeaturewith 5 tests covering:commit-check .git/COMMIT_EDITMSGauto-enables message validationcommit-check --message .git/COMMIT_EDITMSGworks correctlycommit-check --branch .git/COMMIT_EDITMSGvalidates bothAll tests follow existing patterns using
@pytest.mark.benchmarkdecorator and proper mocking of git operations.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.