You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Add comprehensive error handling with specific error types (GitError, ParseError, ConfigurationError)
Replace generic ParserError with detailed ParseError types for better user diagnostics
Implement smart error suggestion logic that avoids redundant suggestions when error messages already contain guidance
Enhance ConventionalCommit validation to reject malformed commits early
Update command error handling with proper stderr output and exit codes
Fix duplicate CHANGELOG.md entries
Error Type Improvements
GitError
Handles git repository operations and command failures
Provides specific recovery suggestions for common git issues
Includes context like failed commands and exit codes
ParseError
Handles conventional commit and semantic version parsing errors
Replaces generic ParserError with specific error cases
Maintains existing error messages while adding better structure
ConfigurationError
Handles command-line options and configuration issues
Provides actionable guidance for fixing configuration problems
Smart Error Display
Commands now intelligently add recovery suggestions only when the original error message lacks guidance (doesn't contain "Learn more" or URLs), preventing redundant suggestions while enhancing basic error messages.
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L120 - swift_conventional_commit_parserTests.ExecutionTests: testMergeRequestHelp failed - Actual output does not match the expected output:
🚫
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L180 - swift_conventional_commit_parserTests.ExecutionTests: testPullRequest_NotGitRepo failed - Actual output does not match the expected output:
🚫
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L192 - swift_conventional_commit_parserTests.ExecutionTests: testPullRequest_NoCommits failed - Actual output does not match the expected output:
🚫
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L206 - swift_conventional_commit_parserTests.ExecutionTests: testRelease_NoCommits failed - Actual output does not match the expected output:
🚫
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L223 - swift_conventional_commit_parserTests.ExecutionTests: testPullRequest_ChoreOnMain_FeatOnBranch failed - Actual output does not match the expected output:
🚫
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L242 - swift_conventional_commit_parserTests.ExecutionTests: testMergeRequest_ChoreOnMain_FeatOnBranch failed - Actual output does not match the expected output:
🚫
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L261 - swift_conventional_commit_parserTests.ExecutionTests: testRelease_ChoreOnMain_FeatOnBranch failed - Actual output does not match the expected output:
🚫
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L280 - swift_conventional_commit_parserTests.ExecutionTests: testPullRequest_ChoreOnMain_FeatOnBranch_TaggedVersion1 failed - Actual output does not match the expected output:
🚫
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L299 - swift_conventional_commit_parserTests.ExecutionTests: testRelease_ChoreOnMain_FeatOnBranch_TaggedVersion1 failed - Actual output does not match the expected output:
🚫
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L318 - swift_conventional_commit_parserTests.ExecutionTests: testPullRequest_ReleaseBranch_HotfixOnBranch_TaggedVersion2 failed - Actual output does not match the expected output:
🚫
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L337 - swift_conventional_commit_parserTests.ExecutionTests: testRelease_ReleaseBranch_HotfixOnBranch_TaggedVersion2 failed - Actual output does not match the expected output:
🚫
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L356 - swift_conventional_commit_parserTests.ExecutionTests: testPullRequest_MainBranch_FeatOnBranch_LastTagNotSemanticVersion failed - Actual output does not match the expected output:
🚫
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L375 - swift_conventional_commit_parserTests.ExecutionTests: testRelease_MainBranch_FeatOnBranch_LastTagNotSemanticVersion failed - Actual output does not match the expected output:
🚫
Tests/swift-conventional-commit-parserTests/ExecutionTests.swift#L394 - swift_conventional_commit_parserTests.ExecutionTests: testPullRequest_ChoreOnMain_FeatOnBranch_CommitHashes failed - Actual output does not match the expected output:
Messages
📖
Executed 14 tests, with 0 failures (0 unexpected) in 0.022 (0.025) seconds
📖
Executed 29 tests, with 0 failures (0 unexpected) in 0.011 (0.015) seconds
📖
Executed 21 tests, with 14 failures (0 unexpected) in 3.195 (3.200) seconds
📖
Executed 3 tests, with 0 failures (0 unexpected) in 2.135 (2.136) seconds
📖
Project coverage: 97.64%
Release notes:
[0.2.0] - 2025-07-28
Features
enhance error handling with specific error types and recovery suggestions (4477e84)
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.
Summary
Error Type Improvements
GitError
ParseError
ConfigurationError
Smart Error Display
Commands now intelligently add recovery suggestions only when the original error message lacks guidance (doesn't contain "Learn more" or URLs), preventing redundant suggestions while enhancing basic error messages.
Test Coverage
Files Changed
Sources/Model/GitError.swift- Git operation errorsSources/Model/ParseError.swift- Parsing errorsSources/Model/ConfigurationError.swift- Configuration errorsSources/SwiftConventionalCommitParser/Parser.swift- Use ParseError instead of ParserErrorSources/Model/ConventionalCommit.swift- Enhanced validationCHANGELOG.md- Removed duplicate entries🤖 Generated with Claude Code