-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
bugSomething isn't workingSomething isn't workingp2Non-showstopper bug or popular feature requestNon-showstopper bug or popular feature request
Description
Description
validateBranchName in src/github/operations/branch.ts uses a strict ASCII-only regex pattern:
const validPattern = /^[a-zA-Z0-9][a-zA-Z0-9/_.-]*$/;This rejects branch names containing non-ASCII characters (e.g. Japanese), even though Git and GitHub fully support them.
Steps to Reproduce
- Create a PR from a branch with a non-ASCII name (e.g.
feat/add-機能追加) - Trigger any workflow using
claude-code-action@v1on that PR - Action fails with:
Invalid branch name: "feat/add-機能追加". Branch names must start with an alphanumeric character and contain only alphanumeric characters, forward slashes, hyphens, underscores, or periods.
Expected Behavior
The action should accept valid Git branch names containing non-ASCII characters (Unicode letters).
Suggested Fix
Update the regex to allow Unicode letters while still blocking dangerous characters:
const validPattern = /^[\p{L}\p{N}][\p{L}\p{N}/_.-]*$/u;This maintains the security intent (blocking control characters, shell metacharacters, etc.) while supporting internationalized branch names.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingp2Non-showstopper bug or popular feature requestNon-showstopper bug or popular feature request