Skip to content

Apply suggestions from code review #8

Apply suggestions from code review

Apply suggestions from code review #8

Workflow file for this run

name: Claude Code Review
on:
pull_request:
types: [opened, synchronize, ready_for_review]
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
env:
CLAUDE_MODEL: eu.anthropic.claude-sonnet-4-6
concurrency:
group: claude-review-${{ github.event.pull_request.number || github.event.issue.number }}
cancel-in-progress: true
jobs:
auto-review:
# ...
concurrency:
group: claude-auto-review-${{ github.event.pull_request.number }}
cancel-in-progress: true
interactive:
# ...
concurrency:
group: claude-interactive-${{ github.event.pull_request.number || github.event.issue.number }}
cancel-in-progress: false
jobs:
auto-review:
name: AI Code Review
if: |
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == 'mendix/web-widgets' &&
github.event.pull_request.user.login != 'uicontent' &&
github.event.pull_request.user.login != 'renovate[bot]' &&
github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: Configure AWS Credentials (OIDC)
uses: aws-actions/configure-aws-credentials@3bb878b6ab43ba8717918141cd07a0ea68cfe7ea # v4
with:
role-to-assume: ${{ secrets.AWS_BEDROCK_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Run Claude Code Review
uses: anthropics/claude-code-action@fefa07e9c665b7320f08c3b525980457f22f58aa # v1
with:

Check failure on line 62 in .github/workflows/ClaudeReview.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ClaudeReview.yml

Invalid workflow file

You have an error in your yaml syntax on line 62
use_bedrock: "true"
github_token: ${{ secrets.GITHUB_TOKEN }}
prompt: |
You are reviewing PR #${{ github.event.pull_request.number }} in the mendix/web-widgets monorepo.
IMPORTANT: Read `.github/copilot-instructions.md` for the complete review guidelines. Follow those instructions precisely.
Focus your review on:
1. Mendix pluggable widget conventions (XML/TSX alignment, data API usage, canExecute checks)
2. React hooks correctness (dependencies, stale closures, async effect guards)
3. MobX store patterns (makeObservable, action boundaries, React integration via useSubscribe)
4. Versioning: if runtime/XML/behavior changes exist, require semver bump + CHANGELOG.md entry
5. Test coverage for new features and bug fixes
6. SCSS/styling following Atlas UI conventions (no inline styles, no overriding core Atlas classes)
Review scope:
- Focus ONLY on changed files (the diff)
- Ignore dist/, lockfile changes, and generated files
- For Renovate/dependency-only PRs, check for breaking changes only
Output format:
- Use inline comments for specific code issues with actionable suggestions
- Include short code snippets when suggesting fixes
- Be specific and reference files/lines
- Post a brief summary comment with overall assessment
claude_args: "--model ${{ env.CLAUDE_MODEL }} --allowedTools \"Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh pr comment:*),Bash(gh api:*),mcp__github_inline_comment__create_inline_comment,Read,Grep,Glob\""
--model ${{ env.CLAUDE_MODEL }}
--allowedTools "Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh pr comment:*),Bash(gh api repos/{owner}/{repo}/pulls/{pull_number}/comments:*),Bash(gh api repos/{owner}/{repo}/pulls/{pull_number}/reviews:*),mcp__github_inline_comment__create_inline_comment,Read,Grep,Glob"
interactive:
name: Claude Interactive
if: |
github.repository == 'mendix/web-widgets' &&
((github.event_name == 'issue_comment' &&
contains(github.event.comment.body, '@claude') &&
github.event.issue.pull_request &&
contains(fromJSON('["MEMBER","COLLABORATOR","OWNER"]'), github.event.comment.author_association)) ||
(github.event_name == 'pull_request_review_comment' &&
contains(github.event.comment.body, '@claude') &&
contains(fromJSON('["MEMBER","COLLABORATOR","OWNER"]'), github.event.comment.author_association)))
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: Configure AWS Credentials (OIDC)
uses: aws-actions/configure-aws-credentials@3bb878b6ab43ba8717918141cd07a0ea68cfe7ea # v4
with:
role-to-assume: ${{ secrets.AWS_BEDROCK_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Run Claude Code
uses: anthropics/claude-code-action@fefa07e9c665b7320f08c3b525980457f22f58aa # v1
with:
use_bedrock: "true"
github_token: ${{ secrets.GITHUB_TOKEN }}
trigger_phrase: "@claude"
claude_args: |
--model ${{ env.CLAUDE_MODEL }}
--allowedTools "Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh pr comment:*),Bash(gh api:*),mcp__github_inline_comment__create_inline_comment,Read,Grep,Glob"