Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ jobs:
npm test

Claude will leave a status comment on this PR when it finishes.
PR-checks will re-run on each new commit.
The Claude workflow re-dispatches PR-checks once it is done, so the
checks below reflect its pushed fixes.
EOF
)
PR_URL=$(gh pr create \
Expand Down
29 changes: 24 additions & 5 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
pull-requests: write
issues: write
id-token: write
actions: read
actions: write
steps:
- name: Checkout repo
uses: actions/checkout@v6
Expand All @@ -65,9 +65,9 @@ jobs:
Run these commands and observe their exit codes via the Bash tool —
not inferred:

npm run lint
npm run build
npm test
npm run lint
npm run build
npm test

Hard rules:
- Run those commands yourself before every push. Do not push
Expand All @@ -79,7 +79,11 @@ jobs:
defaults). Do NOT change product logic.
- Do NOT bump the package version.
- When all commands are green, push commits with your fixes
(if any). \`pr-checks\` will re-run automatically on each push.
(if any). Do NOT try to trigger \`pr-checks\` yourself: a push
made with \`GITHUB_TOKEN\` does not start a workflow run, and
the \`pull_request\` run it queues stays in \`action_required\`.
This workflow re-dispatches \`pr-checks\` for you after this
step finishes.

## MANDATORY final step

Expand All @@ -102,10 +106,25 @@ jobs:
echo PROMPT_EOF
} >> "$GITHUB_OUTPUT"
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
allowed_bots: "*"
prompt: ${{ steps.prep.outputs.prompt }}
claude_args: |
--allowedTools "Edit,Write,MultiEdit,Bash(git:*),Bash(gh:*),Bash(npm:*),Bash(npx:*),Bash(node:*),Bash(rm:*),Bash(mkdir:*),Bash(cat:*),Bash(ls:*),Bash(echo:*),Bash(grep:*),Bash(find:*),Bash(sed:*),Bash(awk:*),Bash(head:*),Bash(tail:*),Bash(diff:*),Bash(mv:*),Bash(cp:*),Bash(touch:*)"
# Claude pushes with GITHUB_TOKEN, so its push fires no `push` run and the
# `pull_request` run GitHub queues for it stays stuck in `action_required`.
# Dispatch the checks explicitly — `workflow_dispatch` is the only trigger
# that is not gated. Runs even if the step above failed, so the PR ends up
# with a red check instead of no checks at all.
- name: Re-dispatch PR checks on the branch Claude pushed to
if: always() && github.event_name == 'workflow_dispatch' && github.event.inputs.branch != ''
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: ${{ github.event.inputs.branch }}
run: |
git fetch origin "$BRANCH"
echo "Dispatching checks for $BRANCH @ $(git rev-parse --short "origin/$BRANCH")"
gh workflow run pr-checks.yml --ref "$BRANCH" || true