PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 9m41s
PR Checks / Backend Smoke (pull_request) Successful in 5s
PR Checks / Build Backend (no push) (pull_request) Successful in 16s
PR Checks / Build Frontend (no push) (pull_request) Successful in 47s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 10s
PR Checks / AI Code Review (Claude) (pull_request) Failing after 2m30s
Commenting '@claude <instruction>' on a PR runs headless Claude Code on the PR branch (subscription auth), pushes the resulting commit — re-running the PR checks — and replies with a summary. Owner-only trigger; runs unsandboxed inside the ephemeral runner container per explicit maintainer sign-off. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PqGhF93UrpDNvXBLMjJENL
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: PR Comment Agent
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created]
|
|
|
|
jobs:
|
|
ai-fixup:
|
|
name: Claude Fix-up (@claude comment)
|
|
runs-on: ubuntu-latest
|
|
# Only PR comments, only from the repo owner, only when addressed to @claude.
|
|
# The owner guard matters: the job pushes code to the PR branch.
|
|
if: >-
|
|
gitea.event.issue.pull_request &&
|
|
startsWith(gitea.event.comment.body, '@claude') &&
|
|
gitea.event.comment.user.login == gitea.repository_owner
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install Claude Code
|
|
run: npm install -g @anthropic-ai/claude-code
|
|
|
|
- name: Apply the requested fix-up
|
|
env:
|
|
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
|
GITEA_REPOSITORY: ${{ gitea.repository }}
|
|
PR_NUMBER: ${{ gitea.event.issue.number }}
|
|
COMMENT_BODY: ${{ gitea.event.comment.body }}
|
|
# Claude Code runs as root inside the runner container; this flag
|
|
# acknowledges the container *is* the sandbox.
|
|
IS_SANDBOX: "1"
|
|
run: python scripts/ci/ai_fixup.py
|