Skip to content

ci: add Claude PR review action#5

Open
fdsimoes-git wants to merge 1 commit into
mainfrom
add-claude-review-action
Open

ci: add Claude PR review action#5
fdsimoes-git wants to merge 1 commit into
mainfrom
add-claude-review-action

Conversation

@fdsimoes-git

Copy link
Copy Markdown
Owner

Drops in the same claude-code-action setup used on the ShedOS repo.

What it does

  • Triggers on PR opened / synchronize and on comments mentioning @claude.
  • Reviews under claude-opus-4-7 (max 30 turns).
  • Posts the review as one top-level PR comment via gh pr comment (the action's built-in MCP inline-comment buffer had silent-failure modes — see ShedOS #11).
  • Standards in .github/CODE_REVIEW.md; per-repo specifics read from CLAUDE.md 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"

🤖 Generated with Claude Code

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"

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml running anthropics/claude-code-action@v1 with guarded triggers and a shell-based comment-posting prompt.
  • New .github/CODE_REVIEW.md defining priorities/scope for the reviewer.
  • Defers repo-specific conventions to CLAUDE.md at 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants