Skip to content

feature: Cursor-CLI Agent #277

feature: Cursor-CLI Agent

feature: Cursor-CLI Agent #277

name: PR Review + Auto-Fix Criticals
on:
pull_request_target:
types: [opened, synchronize, reopened]
permissions:
contents: write
pull-requests: write
issues: write
jobs:
review:
name: Code Review
runs-on: ubuntu-latest
steps:
- name: Minimize old Claude review comments
uses: actions/github-script@v8
with:
script: |
const comments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
for (const comment of comments.data) {
if (comment.body.includes('🤖 AgentReady Code Review') &&
comment.user.login === 'github-actions[bot]') {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: comment.id,
body: `<details><summary>Outdated review (click to expand)</summary>\n\n${comment.body}\n</details>`
});
}
}
- name: Checkout repository
uses: actions/checkout@v4
with:
# Use base branch for security - don't execute fork's .claude/commands/
ref: ${{ github.event.pull_request.base.sha }}
- name: Run AgentReady Code Review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
allowed_non_write_users: '*' # Enable reviews on fork PRs
settings: |
{
"permissions": {
"allow": [
"Bash(gh pr:*)",
"Bash(gh issue:*)",
"Bash(gh search:*)",
"Bash(git:*)"
]
}
}
prompt: |
Run the /review-agentready command on this pull request.
Provide a comprehensive code review focusing on:
- AgentReady attribute compliance
- Security issues
- Code quality
- Best practices
Post the review as a comment on this PR.