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
When a branch like bugifx/update-readme fails validation, the "Suggest:" output was a generic format hint with no indication that the type prefix was a typo.
Changes
BranchValidator._get_close_match_suggestion() — extracts the prefix before /, runs difflib.get_close_matches against the allowed branch types (cutoff=0.6), and returns a ready-to-run git branch -m <corrected> command when a close match is found
BranchValidator._print_branch_failure() — uses the typo-correction suggestion when available; falls back to the static catalog suggest otherwise
Moved difflib and _print_failure to module-level imports
Example
Before:
Suggest: Use <type>/<description> with allowed types or add branch name to allow_branch_names in config...
After (bugifx/update-readme):
Suggest: git branch -m bugfix/update-readme
Branches with no close match (e.g. xyz/branch) continue to show the generic hint.
No successful run was found on main (eec070a) during the generation of this report, so 5877170 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
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 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.
When a branch like
bugifx/update-readmefails validation, the "Suggest:" output was a generic format hint with no indication that the type prefix was a typo.Changes
BranchValidator._get_close_match_suggestion()— extracts the prefix before/, runsdifflib.get_close_matchesagainst the allowed branch types (cutoff=0.6), and returns a ready-to-rungit branch -m <corrected>command when a close match is foundBranchValidator._print_branch_failure()— uses the typo-correction suggestion when available; falls back to the static catalog suggest otherwisediffliband_print_failureto module-level importsExample
Before:
After (
bugifx/update-readme):Branches with no close match (e.g.
xyz/branch) continue to show the generic hint.