Skip to content

Skip bot-authored pull requests, say why a review failed, and stop "already reviewed" noise - #8

Merged
GavinLucas merged 1 commit into
mainfrom
review-gate-author-failure-reason
Oct 2, 2026
Merged

GavinLucas merged 1 commit into
mainfrom
review-gate-author-failure-reason

Conversation

@claudeleet

Copy link
Copy Markdown
Contributor

Three changes to the shared review. Each comes from a run that went wrong yesterday.

  • Bot-authored pull requests are skipped, whoever starts the run. The gate only checked who started the run. On docker-mcp's Dependabot pull request, a person's push started the run, so GitHub supplied the token, and the review ran and then failed. The gate now also checks the pull request's author, using the same lookup as the fork check, so a failed lookup still stops the job. A request by comment on a bot pull request gets a reply, the same as a refused fork request.
  • A review with no verdict says why. The action's own log prints the session's result record without its error text, so usage-limit failures showed only "did not complete". The posting step now reads the last result record from the action's execution file and prints its status and error text in the log and in the comment. The usage and cost figures are left out, and the text is capped at 2,000 characters. The action sets that file's path even when it fails for lack of structured output; I checked this in v1.0.238's src/entrypoints/run.ts.
  • A push of an already-reviewed commit no longer comments. It logs the line instead. A /claude-review request for an already-reviewed commit still gets the reply.

The README is updated to match.

Testing. I ran the gate and the posting step's scripts locally with a stand-in gh. The gate cases were: a bot-authored pull request that is pushed to, the same one requested by comment, a person's pull request, a fork, no token, a bot actor, and a failed lookup. The posting step cases were: an already-reviewed commit by push and by request, and a missing verdict with a usage-limit result record, with no execution file, with an unreadable one, and with an over-long result. I also checked an approval. actionlint passes.

After merge. A release is needed, then each caller's pin moves to it: docker-mcp, send-to-influx, apt and claude-routines. No caller needs any other change, because all three changes use inputs the callers already pass.

…lready reviewed" noise

Three changes to the review, each from a run that went wrong.

The gate skipped a bot only by the run's actor.  A person pushing to a Dependabot pull request
starts a run that GitHub gives the token to, so docker-mcp's Dependabot pull request was reviewed
and the review then failed.  The gate now also skips a pull request whose author is a bot,
whoever starts the run, from the same lookup that checks for a fork, so a failed lookup still
stops the job.  A request by comment gets a reply, as a refused fork request does.

A review that returned no verdict said only "did not complete".  The action's log line prints the
session's result record with its error text left out, so two usage-limit failures showed no
reason anywhere.  The action writes every session message to its execution file and sets the
path even when it fails for want of structured output (claude-code-action v1.0.238,
src/entrypoints/run.ts), so the posting step now reads the last result record from it and prints
its status and error text in the log and in the comment, leaving out the usage and cost
figures.  The text is capped at 2,000 characters, because a session that writes its review as
prose returns the whole review there.

A push of a commit already reviewed posted a comment saying so, which nobody had asked for.  It
now only logs the line; a request by comment still gets the reply.

Tested locally by running the gate and the posting step's scripts with a stand-in gh: the gate
for a bot-authored pull request pushed to and requested by comment, a person's pull request, a
fork, no token, a bot actor and a failed lookup; the posting step for an already-reviewed commit
by push and by request, no verdict with a usage-limit result record, with no execution file,
with an unreadable one and with an over-long result, and an approval.  actionlint passes.

Signed-off-by: Claude Leet <Claude@L337.org>
@GavinLucas
GavinLucas merged commit 6136c02 into main Oct 2, 2026
5 checks passed
@GavinLucas
GavinLucas deleted the review-gate-author-failure-reason branch October 2, 2026 10:47
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