Skip to content

Allow commits to skip Claude review via a head-commit marker#13

Merged
jonathangreen merged 1 commit into
mainfrom
skip-claude-review-marker
Jun 10, 2026
Merged

Allow commits to skip Claude review via a head-commit marker#13
jonathangreen merged 1 commit into
mainfrom
skip-claude-review-marker

Conversation

@jonathangreen

@jonathangreen jonathangreen commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

Adds a way to skip the shared claude-review workflow for a given push, without disabling it on the repo.

Include [skip claude] (or [skip-claude], [claude skip], [claude-skip]) anywhere in the PR's most recent commit message and the review step is skipped. The match is case-insensitive and only the head commit is checked, so pushing a later commit without the marker re-enables review on the next run.

How it works

  • Checkout now uses fetch-depth: 2 so the PR head commit (not just the default merge commit) is reachable locally.
  • A new step reads the head commit message with git log and sets a skip output when the marker is present.
  • The Run Claude Code review step is gated on that output.

README updated to document the marker.

@claude

claude Bot commented Jun 10, 2026

Copy link
Copy Markdown

Claude finished @jonathangreen's task in 2m 37s —— View job


Code Review

  • Gather context (workflow, README, self-review workflow, invocation surface)
  • Verify fetch-depth: 2 reaches the PR head commit
  • Validate skip-marker regex against documented markers
  • Check injection/security of head.sha interpolation
  • Confirm gating correctness and no regression to the review action

Summary

This is a clean, well-scoped change. The fetch-depth: 2 reasoning is correct: actions/checkout checks out the refs/pull/N/merge commit by default on pull_request events, and that merge commit's two parents are the base tip and github.event.pull_request.head.sha — so depth 2 makes the head commit reachable for the local git log read, with no gh api call. The regex \[(skip[ -]claude|claude[ -]skip)\] matches all four documented markers case-insensitively, the head.sha interpolation is a hex SHA so there's no shell-injection surface, and gating the review step on steps.skip_check.outputs.skip != 'true' is correct (and fails closed). The review action reads diffs via gh pr diff rather than local history, so the shallow checkout introduces no regression. The README accurately documents the head-commit-only, case-insensitive behavior. I found no issues that meet the bug-flagging bar and nothing actionable to raise beyond that.

@jonathangreen jonathangreen force-pushed the skip-claude-review-marker branch from ba408f7 to be04a6a Compare June 10, 2026 12:43
@jonathangreen jonathangreen requested a review from a team June 10, 2026 12:44

@tdilauro tdilauro 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.

LGTM! 🚫🤖

@jonathangreen jonathangreen merged commit 182055e into main Jun 10, 2026
4 checks passed
@jonathangreen jonathangreen deleted the skip-claude-review-marker branch June 10, 2026 15:15
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