| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
test_default_signoff_skips_ignored_author did not mock get_git_config_value. Since author resolution reads git config user.name first when validating a prospective message, the test failed whenever the developer had user.name configured locally (it only passed in environments where user.name was unset). Mock it to return an empty string so resolution deterministically falls back to the commit author.
✅ Deploy Preview for commit-check ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Sorry, something went wrong.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 492f6719-1ced-4ab3-af17-67fa9a812a54 📥 CommitsReviewing files that changed from the base of the PR and between bd890f1 and 13e2893. 📒 Files selected for processing (1)
📝 Walkthrough WalkthroughChangesAuthor resolution test
Estimated code review effort: 2 (Simple) | ~5 minutes Suggested reviewers: zerwes 🚥 Pre-merge checks | ✅ 5 ✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
|
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #481 +/- ##
=======================================
Coverage 97.28% 97.28%
=======================================
Files 12 12
Lines 1179 1179
=======================================
Hits 1147 1147
Misses 32 32 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
Merging this PR will not alter performance✅ 380 untouched benchmarks Comparing bugfix/signoff-test-mock-git-config (13e2893) with main (bd890f1) Footnotes
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
test_default_signoff_skips_ignored_author did not mock get_git_config_value, which makes it environment-dependent and fail on any machine where the developer has a local git config user.name set.
Root cause
Author resolution (_resolve_current_author) reads git config user.name first when validating a prospective message (stdin). The test only mocked get_commit_info (returning the ignored bot author), so with a real user.name configured, resolution returned the developer's name instead of dependabot[bot] — the author was not recognized as ignored, the signoff check ran, and the test failed. It only passed in environments where user.name happened to be unset (e.g. CI).
Fix
Mock get_git_config_value to return an empty string so author resolution deterministically falls back to the commit author (get_commit_info("an")), matching the test's intent. No production code changes.
Verification
Generated by Claude Code
Summary by CodeRabbit