-
Notifications
You must be signed in to change notification settings - Fork 3
fix: trigger review skill failed to ack #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,27 +48,44 @@ jobs: | |
| id-token: write | ||
| actions: read | ||
| steps: | ||
| - name: Acknowledge trigger | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const isReviewComment = context.eventName === 'pull_request_review_comment'; | ||
| await github.rest.reactions.createForIssueComment({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| comment_id: isReviewComment | ||
| ? context.payload.comment.id | ||
|
Comment on lines
+54
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 The "Acknowledge trigger" step always calls Extended reasoning...What the bug isThe new "Acknowledge trigger" step (lines 54-60) computes
These operate on different resource namespaces. A review comment ID passed to the issue-comment endpoint will return a 404 Not Found. The dead ternaryOn lines 59-60, the ternary expression is: comment_id: isReviewComment
? context.payload.comment.id
: context.payload.comment.id,Both branches are identical — this is a copy-paste error. The Step-by-step proof
ImpactWhenever the review workflow is triggered by an inline PR review comment (as opposed to a top-level issue comment), the acknowledge step will fail with a 404. This defeats the purpose of the acknowledgment — the user gets no visual feedback that their review request was received. Depending on the workflow’s How to fixBranch on const isReviewComment = context.eventName === pull_request_review_comment;
const params = {
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: context.payload.comment.id,
content: eyes
};
if (isReviewComment) {
await github.rest.reactions.createForPullRequestReviewComment(params);
} else {
await github.rest.reactions.createForIssueComment(params);
}This also eliminates the dead ternary, since |
||
| : context.payload.comment.id, | ||
| content: 'eyes' | ||
| }); | ||
|
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Load review skill | ||
| id: skill | ||
| - name: Install project skills globally | ||
| run: | | ||
| if [ -f ".claude/skills/review.md" ]; then | ||
| SKILL_CONTENT=$(cat .claude/skills/review.md) | ||
| echo "skill_content<<EOF" >> $GITHUB_OUTPUT | ||
| echo "$SKILL_CONTENT" >> $GITHUB_OUTPUT | ||
| echo "EOF" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "skill_content=Perform a thorough code review." >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| mkdir -p ~/.claude/skills | ||
| cp -rfv .claude/skills/* ~/.claude/skills/ | ||
|
|
||
| - name: Run Claude Review | ||
| id: claude | ||
| uses: anthropics/claude-code-action@v1 | ||
| with: | ||
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| track_progress: true | ||
| show_full_output: true | ||
| prompt: | | ||
| ${{ steps.skill.outputs.skill_content }} | ||
| REPO: ${{ github.repository }} | ||
| PR NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }} | ||
|
|
||
| Use the pr-review skill to perform a code review of this PR. | ||
|
|
||
|
Comment on lines
+81
to
+88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Extended reasoning...Bug DescriptionThe
However, the workflow uses
Step-by-step proof
ImpactWhen triggered by a PR review comment (as opposed to a regular issue comment on a PR), the entire review workflow silently breaks: Claude receives no PR number in its prompt and cannot post the review summary back because FixReplace both occurrences of This falls back to |
||
| When done, post your full review summary as a PR comment using: | ||
| gh pr comment ${{ github.event.pull_request.number || github.event.issue.number }} --body "<your review>" | ||
| claude_args: "--allowedTools Skill,SlashCommand,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Read,Glob,Grep" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
| /target | ||
| .claude | ||
| .claude/* | ||
| !.claude/skills/ | ||
| !.claude/skills/*.md | ||
| .vscode | ||
|
|
||
| tests/data | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevent name clashes with default skills.