fix: allow Unicode letters in branch name validation - #1025
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
|
👋 Hi! Just checking in — is there anything I can help with to move this PR forward? Happy to address any feedback! 🙏 |
|
👍 Looks good to merge — clean fix, thanks for contributing! |
|
Hi @ALL, gentle reminder that this PR is waiting for review. Happy to make any changes — just let me know! 🙏 |
|
Thanks for this contribution! Bumping for visibility. |
|
Would it be possible to merge this PR? Happy to make any adjustments if needed. Thank you for your time! |
|
➿ bump (R337) |
|
Thanks for the effort here, but this bundles four unrelated changes into one PR, which makes it hard to review or land, and a couple of the pieces overlap other open PRs. One part also can't go in as written: the If you'd like to pursue any of the individual fixes, please open them as separate, focused PRs (without the Copilot check). |
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