fix(tests): override core.hooksPath in test repos to prevent bypass - #55
fix(tests): override core.hooksPath in test repos to prevent bypass#55google-labs-jules[bot] wants to merge 1 commit into
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
What:
Set
core.hooksPathto.git/hookslocally when initializing temporary git repositories intest_hooks.py.Why:
The test
HooksTests.test_end_to_end_post_commit_runsfails in environments where a globalcore.hooksPathconfiguration (e.g., set to/dev/nullor by tools likepre-commit) bypasses the local hooks execution. By overriding it locally for the test repositories, we guarantee that the installed hook gets triggered as expected duringgit commit, stabilizing the test regardless of host configuration.Risk:
Low. The change only impacts the setup of temporary test repositories within
tests/test_hooks.py. It does not affect production code or external repositories.PR created automatically by Jules for task 4906147748027970433 started by @raccioly