fix: allow @, #, and Unicode in branch names#1043
Open
nikp29 wants to merge 1 commit intoanthropics:mainfrom
Open
fix: allow @, #, and Unicode in branch names#1043nikp29 wants to merge 1 commit intoanthropics:mainfrom
nikp29 wants to merge 1 commit intoanthropics:mainfrom
Conversation
- Allow @ character for common naming patterns (fixes anthropics#998) - Allow # character for Azure DevOps integration (fixes anthropics#1024) - Allow Unicode characters for internationalization (fixes anthropics#1020) - Quote branch name in git push command to prevent # being treated as comment - Add comprehensive unit and e2e tests Security: Quotes are still blocked by validation, making shell interpolation safe.
54604f1 to
cad02ee
Compare
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.
Problem
Branch name validation was too restrictive, blocking valid use cases:
#character (AB#123-description)@in branch names (TICKET@description)Solution
Updated validation regex to allow:
@character (but still block@{git reflog syntax)#character for Azure DevOpsAdded quotes around branch name in git push command to prevent
#being interpreted as bash comment.Security
Quotes (
"and') are still blocked by validation, making shell interpolation safe.Testing
Added tests for all three new character types.
Fixes