Skip to content

claude-review: embed the reviewed commit SHA in the review comment body #423

Description

@d-morrison

Why

Morrison-Lab/ai-config's scripts/check-pr-fully-clean.py verifies a PR is fully clean by finding an automated review comment that evaluated the current HEAD SHA. To be safe (fail-closed), it now requires a review comment to reference the HEAD SHA (full or short) before counting it — a comment that merely posted after the HEAD commit is no longer accepted, because a slow review of an earlier commit can land after a newer push and would otherwise be read as a review of the new HEAD (the review-vs-push race shared/workflow/fully-clean.md documents). See ai-config#1167.

The problem: claude-code-review's posted comment does not reliably embed the commit SHA it reviewed. Sampling recent Morrison-Lab/ai-config review comments, some do not contain the head short-SHA at all. So a verifier that requires the SHA will frequently (and safely, but unhelpfully) report "no review evaluating HEAD yet" even when a genuine clean review exists.

Request

Have claude-code-review.yml (the reusable review workflow) print the reviewed commit SHA in the review comment body — e.g. a trailer line like Reviewed commit: <full-sha> — so any consumer (check-pr-fully-clean.py, a human, or the no-stale-pr-status hook) can reliably associate a review comment with the exact commit it evaluated.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions