ci: add Claude PR review action#5
Open
fdsimoes-git wants to merge 1 commit into
Open
Conversation
Drops in the same claude-code-action setup used on the ShedOS repo. Triggers on PR open/synchronize and on comments mentioning @claude. Posts the review as a top-level PR comment via 'gh pr comment'. Standards live in .github/CODE_REVIEW.md; per-repo specifics get picked up from CLAUDE.md at the repo root if present. Before merging, add the secret: gh secret set CLAUDE_CODE_OAUTH_TOKEN --repo fdsimoes-git/fitness-monitor-and-assistant \ <<<"$CLAUDE_CODE_OAUTH_TOKEN"
There was a problem hiding this comment.
Pull request overview
Adds a Claude-based PR review GitHub Action ported from the author's ShedOS repo, plus a shared CODE_REVIEW.md standards file. The workflow triggers on PR open/sync and on @claude mentions in comments, and posts review output via gh pr comment rather than the action's built-in posting mechanisms (which silently failed in prior attempts).
Changes:
- New workflow
.github/workflows/claude-review.ymlrunninganthropics/claude-code-action@v1with guarded triggers and a shell-based comment-posting prompt. - New
.github/CODE_REVIEW.mddefining priorities/scope for the reviewer. - Defers repo-specific conventions to
CLAUDE.mdat repo root.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/claude-review.yml | Adds the Claude PR review job with trigger filtering and gh-based comment posting. |
| .github/CODE_REVIEW.md | Adds reviewer guidance (what to flag / not flag, comment format). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+50
to
+65
| Review PR #${{ github.event.pull_request.number }} of | ||
| ${{ github.repository }}. Read CLAUDE.md and | ||
| .github/CODE_REVIEW.md if present and follow their | ||
| standards. Focus on: correctness bugs, security issues, | ||
| missing error handling, missing tests, and breaking | ||
| changes for callers. Be specific and terse. | ||
|
|
||
| POST the review by running this exact command via the Bash | ||
| tool (no other path will reach the PR — the action's | ||
| built-in posting mechanism does not work for us): | ||
|
|
||
| cat <<'REVIEW_EOF' > /tmp/review.md | ||
| <YOUR MARKDOWN REVIEW HERE> | ||
| REVIEW_EOF | ||
| gh pr comment ${{ github.event.pull_request.number }} \ | ||
| --body-file /tmp/review.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drops in the same
claude-code-actionsetup used on the ShedOS repo.What it does
opened/synchronizeand on comments mentioning@claude.claude-opus-4-7(max 30 turns).gh pr comment(the action's built-in MCP inline-comment buffer had silent-failure modes — see ShedOS #11)..github/CODE_REVIEW.md; per-repo specifics read fromCLAUDE.mdif present.Before merging — add the secret
🤖 Generated with Claude Code