Repository navigation
Conversation
The variable c held the git commit result and then the git tag result. Use commit_result and tag_result so each name tells what it holds.
Move the two inline any() expressions out of the git.tag() call into should_sign_tag and should_annotate_tag.
The "no increment and same tag" condition was written twice in __call__. Move it to _is_not_eligible_for_bump. Move the commit retry condition to _should_retry_commit.
Move the changelog block into _update_changelog to make __call__ shorter. No change in behavior.
Bump decided what to release and also wrote it to git. Move the commit, retry and tag steps and their three settings into GitReleasePublisher. Add tests for retry and for commit and tag errors.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2133 +/- ##
==========================================
+ Coverage 98.29% 98.30% +0.01%
==========================================
Files 61 61
Lines 2874 2891 +17
==========================================
+ Hits 2825 2842 +17
Misses 49 49 ☔ View full report in Codecov by Harness. |
Member
|
Hi thanks for this but it doesn't add any value |
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.
Description
Part of #2129. Depends on #2130.
Bumpdecided what to release and also wrote the release to git. Move the git commit, the commit retry and the tag steps into a newGitReleasePublisherclass incommands/bump.py. Its fields areno_verify,retryandgit_output_to_stderr.Bumpnow callsself.git_publisher.commit(...)and.tag(...).Checklist
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code following the guidelines. AI suggested the changes; I wrote and reviewed the code by hand.
Code Changes
uv run poe alllocally to ensure this change passes linter check and testsExpected Behavior
No change. Same commit, retry, output and tag behavior as before.
Steps to Test This Pull Request
uv run poe alltests/test_git_release_publisher.pycover these cases:--no-verifyis passed to gitBumpTagFailedErrorcz bump --changelog --yesand check the commit and tag.Additional Context
Pure refactor, so no docs change.