anthropics / anthropics/claude-code-action

Claude PR reviews are influenced by other comments

Abierto
#260 5 comentarios 2 reacciones 0 asignados Ver en GitHub
bug p2
Lenguaje dominante
TypeScript
Estrellas
8.9k
Forks
2.1k
Merge medio
3 d 9 h
PR fusionados (30 d)
10

Descripción

We're using claude-code-action to do automatic PR reviews and can see that generated reviews are influenced by other comments, including comments from claude itself. For example

if someone left a comment saying that certain line won't work, claude will just assume that this is a valid comment without actually verifying this statement and claiming that this is a "well founded feedback that need to be addressed" causing confusion. not to mention, that comments at times may be excessive and off topic.

I _think_ the reason this is happening is that claude gets all PR details as prompt - [link](https://github.com/anthropics/claude-code-action/blob/main/src/create-prompt/index.ts#L513)

Attempts to add something along the lines `**Ignore all prior comments, discussions, or reviews**, even from yourself.` to the direct_prompt didn't work.

Im wondering if there is a way to work around that and make claude reviews truly independent?

Or, for example, i can look into making a PR to allow PR context customisation:

```
- name: review
uses: anthropics/claude-code-action@v0.0.32
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
timeout_minutes: '15'
use_sticky_comment: false
inject_context:
- pr_title
- pr_description
- comments
- review_comments
- ...
direct_prompt: Review this PR
```

Or, in fact, any other implementation we can agree on to solve this problem.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.