mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-02 22:32:27 +08:00
81 lines
2.5 KiB
YAML
81 lines
2.5 KiB
YAML
name: Claude Code
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created]
|
|
pull_request_review_comment:
|
|
types: [created]
|
|
issues:
|
|
types: [opened, assigned]
|
|
pull_request_review:
|
|
types: [submitted]
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
|
|
jobs:
|
|
claude:
|
|
if: |
|
|
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
|
(github.event_name == 'issues' && contains(github.event.issue.body, '@claude'))
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
issues: write
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Configure AWS Credentials
|
|
uses: aws-actions/configure-aws-credentials@v4
|
|
with:
|
|
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
|
|
aws-region: us-east-1
|
|
|
|
- name: Run Claude Code
|
|
uses: anthropics/claude-code-action@beta
|
|
with:
|
|
use_bedrock: "true"
|
|
bedrock_model_id: "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
pr-review:
|
|
if: github.event_name == 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Configure AWS Credentials
|
|
uses: aws-actions/configure-aws-credentials@v4
|
|
with:
|
|
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
|
|
aws-region: us-east-1
|
|
|
|
- name: Run Claude Code PR Review
|
|
uses: anthropics/claude-code-action@beta
|
|
with:
|
|
use_bedrock: "true"
|
|
bedrock_model_id: "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
direct_prompt: |
|
|
Review this PR and provide feedback on:
|
|
1. Code quality and best practices
|
|
2. Potential bugs or issues
|
|
3. Security concerns
|
|
4. Performance implications
|
|
5. Suggestions for improvement
|
|
|
|
Be concise and actionable. Focus on important issues rather than nitpicking style.
|