feat: add configurable branch prefix to avoid naming conflicts#121
Open
note89 wants to merge 1 commit into
Open
feat: add configurable branch prefix to avoid naming conflicts#121note89 wants to merge 1 commit into
note89 wants to merge 1 commit into
Conversation
- Add 'branch_prefix' input parameter to action.yml (defaults to 'claude') - Pass branch prefix through context and use it for branch creation - Improve error serialization using JSON.stringify for better debugging - Add detailed error messages for 422 errors explaining Git naming conflicts - Provide clear solutions when branch creation fails due to existing branches This allows users to configure a custom branch prefix (e.g., 'claude-agent') to avoid conflicts when a branch named 'claude' already exists in the repository.
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
When a repository has an existing branch named
claude, the action fails with a 422 error when trying to create branches likeclaude/issue-123. This is due to Git's limitation where you cannot have both a branch namedXand branches namedX/....This can easily happen if:
claudebranch for testing (what happend to us, took a long time to figure out)Solution
This PR adds a configurable
branch_prefixinput parameter that allows users to customize the prefix used for branch creation.Changes
branch_prefixinput parameter to action.yml (defaults to 'claude' for backward compatibility)[Object ...]Example Usage