Skip to content

fix: skip version bump for formatting-only changes#34

Merged
TheRealAgentK merged 1 commit intomasterfrom
fix/version-check-formatting-only
Apr 16, 2026
Merged

fix: skip version bump for formatting-only changes#34
TheRealAgentK merged 1 commit intomasterfrom
fix/version-check-formatting-only

Conversation

@TheRealAgentK
Copy link
Copy Markdown
Collaborator

Problem

The version checker requires a version bump when source files have formatting-only changes (e.g., after running ruff format). This blocks PRs that add tests to existing integrations, because CI reformats pre-existing source files and the version checker sees "new functions/classes" in the diff.

Fix

Uses git diff -w (ignore all whitespace) to detect formatting-only changes. If non-test source files changed but git diff -w shows no differences, the changes are whitespace-only and no version bump is required.

Added to both get_diff_stats() (new only_formatting flag) and check_version_bump() (expanded skip condition). Prints ✅ No version bump needed (only formatting/whitespace changed).

Context

Discovered on PR Autohive-AI/autohive-integrations#250 — adding unit tests triggered ruff format on pre-existing source files (bitly.py, notion.py, nzbn.py), causing "Version not incremented" failures for 3 integrations.

Uses git diff -w (ignore whitespace) to detect when non-test source
file changes are formatting-only. If the whitespace-ignored diff is
empty, no version bump is required. This allows running code formatters
like ruff format without triggering version bump failures.
@TheRealAgentK TheRealAgentK merged commit c929fa6 into master Apr 16, 2026
5 checks passed
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.

2 participants