Repository navigation
fix: validate release inputs and reject version counter overflow - #24
Merged
Merged
Conversation
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.
Malformed commit headers could trigger major or minor releases, and malformed numeric tags could become the release baseline. Version and build counters could also overflow into negative values that Tagger could no longer parse.
Validate the complete commit header before applying its type or breaking markers. Require canonical decimal version components and numeric suffixes. Version.Bump now returns an error on overflow, and the CLI stops before creating or pushing a tag. No-op bumps remain unchanged.
Closes #18
Closes #19
Closes #20
Validation: regression tests reproduced each failure before the fixes. Tests cover malformed headers, Git discovery with malformed numeric tags, portable integer boundaries, lower-component resets, and no create/push after overflow. Existing case-insensitive types, GitLab merges, and numeric suffix examples remain covered.
go test ./...,go vet ./..., and golangci-lint v2.13.0 pass.