fix: allow Unicode letters in branch name validation#1025
Open
Jah-yee wants to merge 4 commits intoanthropics:mainfrom
Open
fix: allow Unicode letters in branch name validation#1025Jah-yee wants to merge 4 commits intoanthropics:mainfrom
Jah-yee wants to merge 4 commits intoanthropics:mainfrom
Conversation
Previously, validateBranchName only allowed ASCII alphanumeric characters,
rejecting valid Unicode branch names (e.g., Japanese characters).
This fix uses Unicode property escapes (\p{L} for letters, \p{N} for numbers)
to allow valid Unicode branch names while still blocking dangerous characters.
Fixes: anthropics#1020
Azure DevOps uses # for ticket linking in branch names (e.g., feature/AB#1992). This fix adds # to the allowed characters in branch name validation. Fixes: anthropics#1024
shell-quote treats # as a comment character, causing all content after a comment line to be swallowed. This fix strips lines starting with # before passing to parseShellArgs, so users can add documentation comments to their claude_args without breaking subsequent flags. Fixes: anthropics#1019, anthropics#802
checkWritePermissions() calls repos.getCollaboratorPermissionLevel() with github.actor as username. When actor is Copilot (from Copilot- initiated pull_request_review), the API returns 404 because Copilot is not a regular GitHub user. This fix adds Copilot to the bypass list alongside [bot] accounts. Fixes: anthropics#1018
goodtune
reviewed
Mar 7, 2026
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.
Summary
This PR adds multiple fixes for branch validation and permission checking:
1. Unicode Branch Names (#1020)
機能/fix)\p{L}for letters,\p{N}for numbers)2. Azure DevOps # Character (#1024)
#in branch names for Azure DevOps ticket linking#for ticket linking (e.g.,feature/AB#1992-sentry)3. Shell Comment Stripping (#1019)
#before parsingclaude_args4. Copilot Permission Check (#1018)
Copilotto the bypass list for permission checkingChanges
validPatternregex for Unicode and # supportparseClaudeArgsToExtraArgs()Copilotcheck alongside[bot]accountsRelated
Fixes #1020, Fixes #1024, Fixes #1019, Fixes #1018