mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.9 KiB
53 lines
1.9 KiB
name: Claude
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created]
|
|
pull_request_review_comment:
|
|
types: [created]
|
|
pull_request_review:
|
|
types: [submitted]
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
issues: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: claude-${{ github.event.issue.number || github.event.pull_request.number }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
claude:
|
|
if: contains(github.event.comment.body, '@claude') || contains(github.event.review.body, '@claude')
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 50
|
|
|
|
- uses: actions/setup-dotnet@v5
|
|
with:
|
|
dotnet-version: "10.0.x"
|
|
|
|
- uses: actions/setup-node@v5
|
|
with:
|
|
node-version: "22"
|
|
cache: npm
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- name: Install frontend dependencies
|
|
working-directory: frontend
|
|
run: npm ci --loglevel=error --no-audit --no-fund
|
|
|
|
- uses: anthropics/claude-code-action@v1
|
|
with:
|
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
claude_args: >-
|
|
--model ${{ vars.CLAUDE_MODEL || 'claude-opus-5-5' }}
|
|
--max-turns 40
|
|
--append-system-prompt "Follow CLAUDE.md. Before committing, verify your changes: for backend changes run dotnet build on the affected project and the related tests with --filter \"Category!=Dependencies & Category!=TestContainer\"; for frontend changes run npm run lint and npm test in frontend/. Never commit frontend/package-lock.json."
|
|
--allowedTools "Read,Grep,Glob,Edit,Write,Bash(git status:*),Bash(git log:*),Bash(git diff:*),Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh pr list:*),Bash(gh issue view:*),Bash(dotnet build:*),Bash(dotnet test:*),Bash(npm run lint:*),Bash(npm test:*),Bash(npx vitest:*)"
|
|
|