anthropics / anthropics/claude-code-action
Comments in (forked) PR trigger claude-code-action with wrong branch
- Lenguaje dominante
- TypeScript
- Estrellas
- 8.9k
- Forks
- 2.1k
- Merge medio
- 3 d 9 h
- PR fusionados (30 d)
- 10
Descripción
I am using the https://github.com/anthropics/claude-code-action/blob/main/examples/claude.yml workflow.
According to https://github.com/orgs/community/discussions/25917,
> Comments on issues and pull requests will have the ref [set to the default branch](https://help.github.com/en/articles/events-that-trigger-workflows). However, you should be able to inspect the full [github event context ](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#contexts)for the information about the pull request in question.
Workflow triggered by issue_comment (thus a comment in PR) will checkout to the base branch, which provides wrong context for claude-code to work with.
What is the suggested way to fix this?
- Prompt Claude to let it checkout to the PR branch automatically?
- Make the action `actions/checkout@v4` checkout to the correct branch if on PR comments?
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.