anthropics / anthropics/claude-code-action

Feature Request: Configurable branch naming besides prefix

Offen
#566 4 Kommentare 8 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement feature-request p2
Vorherrschende Sprache
TypeScript
Sterne
8.9k
Forks
2.1k
Ø Merge
3 T. 9 Std.
Gemergte PRs (30 T.)
10

Beschreibung

Add support for configurable branch naming conventions to follow other branching strategies (e.g. GitFlow), allowing teams to customize branch prefixes based on issue types. Ideally we could define **Git Instructions** in CLAUDE.md and claude would suggest the branch name following those suggestions, instead of just configuring branch prefix. The github action code would then use that.

Currently we can edit the branch prefix and the type can only have "pr" or "issue":
https://github.com/anthropics/claude-code-action/blob/1d4650c102d922ea85062d567f39fbd6fab85a3f/src/github/operations/branch.ts#L99

Could we have this branch name done by Claude, with a fallback being the current logic?

**Examples**
Text in CLAUDE.md:
```md
## Git instructions
- Please name any branch you create with our **naming conventions**:

| Branch type | Examples |
| --- | --- |
| Bugfix | bugfix/issue-123-small-description |
| Feature | feature/issue-456-small-description |
| None or Task | task/issue-999-small-description |
```

**Output branch name for Claude**:
Issue with "bug" type or label: bugfix/issue-123-small-description
Issue with "feature" type or label: feature/issue-456-small-description
Issue with no matching labels or no defined type: task/issue-999-small-description

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.