Skip to content
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

Fail when hooks fail #239

Merged
merged 3 commits into from
Oct 6, 2024
Merged

Fail when hooks fail #239

merged 3 commits into from
Oct 6, 2024

Conversation

coordt
Copy link
Member

@coordt coordt commented Sep 28, 2024

When a setup, pre-commit, or post-commit hook returns a non-zero response, an error is raised.

The stdout and stderr are logged as warnings to the console.

Fixes #236

Updated subprocess calls to disable check, refined lint configurations, fixed type annotations and exceptions, and improved dictionary path validation.
Raise HookError when a hook script exits with a non-zero status. Modified logger to display warnings instead of debug messages in such scenarios. Added tests to ensure exceptions are raised for failed hooks.
@coordt coordt linked an issue Sep 28, 2024 that may be closed by this pull request
Copy link

Version hint: minor
Current version: 0.26.1
New version (when merged): 0.27.0

Comment ID: Display the version hint-auto-generated

Copy link

github-actions bot commented Sep 28, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://callowayproject.github.io/bump-my-version/pr-preview/pr-239/
on branch gh-pages at 2024-09-28 15:36 UTC

Copy link

codecov bot commented Sep 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.99%. Comparing base (130478d) to head (538c420).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #239      +/-   ##
==========================================
+ Coverage   93.97%   93.99%   +0.02%     
==========================================
  Files          26       26              
  Lines        1709     1716       +7     
  Branches      330      331       +1     
==========================================
+ Hits         1606     1613       +7     
  Misses         75       75              
  Partials       28       28              
Flag Coverage Δ
python-3.10 93.99% <100.00%> (+0.02%) ⬆️
python-3.11 93.99% <100.00%> (+0.02%) ⬆️
python-3.8 93.91% <100.00%> (+0.02%) ⬆️
python-3.9 93.91% <100.00%> (+0.02%) ⬆️

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.

@coordt coordt merged commit 3a1eddf into master Oct 6, 2024
14 of 15 checks passed
@coordt coordt deleted the 236-fail-if-hooks-fail branch October 6, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bump-my-version does not fail if script hooks fail
1 participant