GRM-34: Skip commit when version unchanged in release.py #19

Merged
emil merged 0 commits from GRM-34-fix-no-changes-commit into master 2026-06-21 16:18:03 +00:00
Owner

Summary

When the calculated version equals the current version (e.g., first release with version already at 0.1.0), git commit fails with nothing to commit. Now create_release_commit checks for staged changes via git diff --cached --quiet and returns False if there are none, skipping the commit and push. The tag is still created and pushed.

Tests

  • test_skips_when_no_changes: verifies create_release_commit returns False and skips git commit
  • test_full_flow_no_commit: verifies the full flow skips commit push but still tags

Closes GRM-34

## Summary When the calculated version equals the current version (e.g., first release with version already at 0.1.0), git commit fails with nothing to commit. Now create_release_commit checks for staged changes via git diff --cached --quiet and returns False if there are none, skipping the commit and push. The tag is still created and pushed. ### Tests - test_skips_when_no_changes: verifies create_release_commit returns False and skips git commit - test_full_flow_no_commit: verifies the full flow skips commit push but still tags Closes GRM-34
emil reviewed 2026-06-21 16:17:55 +00:00
emil left a comment
Author
Owner

All CI checks pass. Fix handles the edge case where version is unchanged by checking staged changes before committing. LGTM.

All CI checks pass. Fix handles the edge case where version is unchanged by checking staged changes before committing. LGTM.
emil added the ready-to-merge label 2026-06-21 16:17:55 +00:00
emil merged commit abf4acc34c into master 2026-06-21 16:18:03 +00:00
emil deleted branch GRM-34-fix-no-changes-commit 2026-06-21 16:18:03 +00:00
Sign in to join this conversation.