anthropics / anthropics/claude-code-action

Feature Request: Configurable branch naming besides prefix

Aperta
#566 4 commenti 8 reazioni 0 assegnatari Vedi su GitHub
enhancement feature-request p2
Lingua principale
TypeScript
Stelle
8.9k
Fork
2.1k
Merge medio
3g 9h
PR unite (30g)
10

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.