anthropics / anthropics/claude-code-action

Multiple jobs overwrite each other's PR comments

未关闭
#770 4 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
bug p2
主要语言
TypeScript
星标
8.9k
派生
2.1k
平均合并
3 天 9 小时
30 天内合并 PR
10

描述

## Problem

When using `claude-code-action` in multiple parallel jobs within the same workflow (e.g., separate "Code Quality Review" and "Security Review" jobs), the PR comments overwrite each other. Only the last job's comment remains visible.

## Expected Behavior

Each job should be able to post its own independent comment that persists, allowing for:
- Separate code quality review comment
- Separate security review comment
- Any other specialized review comments

## Current Behavior

When two jobs run in parallel:
```yaml
jobs:
code-review:
steps:
- uses: anthropics/claude-code-action@v1
with:
prompt: "Review code quality..."

security-review:
steps:
- uses: anthropics/claude-code-action@v1
with:
prompt: "Review security..."
```

The second job's comment overwrites the first one, resulting in only one visible comment.

## Attempted Workarounds

1. **Using `use_sticky_comment: false`** - Comments still collide
2. **Using `marocchino/sticky-pull-request-comment`** with different `header` values - Doesn't work because `claude-code-action` posts its own comment regardless
3. **Combining prompts into single job** - Works but loses the benefit of parallel execution and separate concerns

## Proposed Solutions

1. Add a `comment_id` or `comment_header` parameter to differentiate comments from different jobs
2. Support for custom comment posting (disable built-in commenting, expose result as output only)
3. Built-in support for multiple review types with separate comments

## Environment

- Action version: v1
- Workflow trigger: pull_request

## Use Case

We want to run specialized reviews in parallel:
- Code quality review
- Security review (SQL injection, auth issues, etc.)

Each review has different prompts and should produce separate, persistent comments.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。