anthropics / anthropics/claude-code-action

Feature: Create new branch for open PRs

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

Beschreibung

Hi there!

Right now when Claude is triggered on an open PR (via `@claude` mentions), it pushes commits directly to the PR branch. I've noticed this can be limiting in some workflows:

1. CI checks don't seem to run because commits from `github-actions[bot]` don't trigger workflows
2. Changes go directly into the PR without a way to review them separately first

I saw this mentioned in #319 and #828.

Would it make sense to have an option to create a new branch from the PR branch instead of pushing directly? Something like:

```yaml
- uses: anthropics/claude-code-action@v1
with:
use_new_branch_for_open_prs: true
```

If enabled, it could:
- Create a new branch from the PR's head branch (like `claude/pr-123-fix`)
- Commit changes there
- Provide a link to create a PR from that branch back to the original PR branch

This might let CI run on the new branch, and give a chance to review the changes before merging.

**Example workflow:**
1. I have PR `#123` from `feature-branch`
2. I comment `@claude fix the failing tests`
3. Claude creates `claude/pr-123-fix` from `feature-branch`
4. CI could run on the new branch
5. I could review and merge it back to `feature-branch`

This would be opt-in (default `false`) to avoid changing existing behavior. If this seems useful, I'd be happy to try implementing it!

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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