diff --git a/.github/workflows/claude-auto-review-test.yml b/.github/workflows/claude-auto-review-test.yml index b9031fe..9775b33 100644 --- a/.github/workflows/claude-auto-review-test.yml +++ b/.github/workflows/claude-auto-review-test.yml @@ -24,15 +24,16 @@ jobs: prompt: | Please review this PR and provide comprehensive feedback. - Use the mcp__github_inline_comment__create_inline_comment tool to add inline comments on specific lines where you have feedback. - - In your review, provide thoughtful feedback on: + Focus on: - Code quality and best practices - Potential bugs or issues - Suggestions for improvements - Overall architecture and design decisions - Documentation consistency - - Be constructive and specific in your feedback. + + After completing your review, post it as a comment on the PR using this command: + gh pr comment ${{ github.event.pull_request.number }} --body "YOUR_REVIEW_HERE" + + Format your review nicely with markdown, using headers, bullet points, and code blocks as needed. anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - claude_args: "--allowedTools mcp__github_inline_comment__create_inline_comment,Read,Grep,Glob" + claude_args: "--allowedTools Bash(gh pr comment:*),Read,Grep,Glob" diff --git a/src/modes/agent/index.ts b/src/modes/agent/index.ts index c47b97d..5153230 100644 --- a/src/modes/agent/index.ts +++ b/src/modes/agent/index.ts @@ -78,6 +78,8 @@ export const agentMode: Mode = { REPO_OWNER: context.repository.owner, REPO_NAME: context.repository.repo, CLAUDE_COMMENT_ID: process.env.CLAUDE_COMMENT_ID || "", + PR_NUMBER: (context as any).entityNumber?.toString() || process.env.GITHUB_EVENT_PULL_REQUEST_NUMBER || "", + ISSUE_NUMBER: (context as any).entityNumber?.toString() || "", GITHUB_EVENT_NAME: process.env.GITHUB_EVENT_NAME || "", GITHUB_API_URL: process.env.GITHUB_API_URL || "https://api.github.com",