Skip to content

[WC-3477] Do not render image when the image is not available #676

[WC-3477] Do not render image when the image is not available

[WC-3477] Do not render image when the image is not available #676

Workflow file for this run

name: Claude Code Review
on:
pull_request:
types: [opened, synchronize, ready_for_review]
env:
# EU cross-region inference profile — must match the region prefix in AWS_REGION secret (eu-*)
CLAUDE_MODEL: eu.anthropic.claude-sonnet-4-6
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 != 'uicontent[bot]' &&
github.event.pull_request.user.login != 'renovate[bot]' &&
github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 15
concurrency:
group: claude-auto-review-${{ github.event.pull_request.number }}
cancel-in-progress: true
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: Minimize older bot comments
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
COMMENTS=$(gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --json comments \
--jq '.comments[] | select(.author.login == "github-actions") | .id')
if [ -z "$COMMENTS" ]; then
echo "No bot comments to minimize"
exit 0
fi
for NODE_ID in $COMMENTS; do
echo "Minimizing comment: $NODE_ID"
gh api graphql -f query='
mutation($id: ID!) {
minimizeComment(input: {subjectId: $id, classifier: OUTDATED}) {
minimizedComment { isMinimized }
}
}' -f id="$NODE_ID" || echo "Failed to minimize $NODE_ID, continuing..."
done
- name: Run Claude Code Review
uses: anthropics/claude-code-action@11ba60486e4aec9ddfeafcf4bb3f00b028ac2c16 # v1.0.142
with:
use_bedrock: "true"
use_sticky_comment: "true"
additional_permissions: |
actions: read
github_token: ${{ secrets.GITHUB_TOKEN }}
prompt: |
You are reviewing PR #${{ github.event.pull_request.number }} in the mendix/web-widgets monorepo.
Read these files for full context and review guidelines:
- `AGENTS.md` — repo conventions, commands, and constraints
- `.agents/skills/code-review/SKILL.md` — complete review checklist and heuristics
Follow the skill guidelines precisely. Focus only on changed files in the diff; ignore dist/, lockfiles, and generated files.
claude_args: >-
--model ${{ env.CLAUDE_MODEL }} --max-turns 30 --allowedTools "Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh pr comment:*),Bash(gh api:*),Bash(gh run:*),Bash(git log:*),Bash(git diff:*),Bash(ls:*),Bash(find:*),mcp__github_inline_comment__create_inline_comment,Read,Grep,Glob"