Repository navigation
Post docs-review summary as PR comment when no inline findings - #144
Merged
Merged
Conversation
When the docs-review workflow is triggered by an issue_comment event (which is how the PR-menu /docs-review slash command fires), gh-aw's submit_pull_request_review handler cannot resolve the PR — its resolveTarget path treats only pull_request* events as PR context, so body-only reviews silently drop with "No review context available". The handler for create_pull_request_review_comment, by contrast, reads context.payload.issue.pull_request and works fine on the same trigger. Before #137 the agent always emitted at least one inline comment via the docs skills, which set the review context as a side effect. The autonomous Vale-only flow now produces zero inline comments on clean PRs, exposing the latent gh-aw asymmetry. Tracked upstream at github/gh-aw#30964. Switch the no-findings path to add_comment, which correctly handles issue_comment payloads, so the summary always posts. submit_pull_request_review remains the path when there are inline review comments to attach. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.
Summary
submit_pull_request_review(body-only) toadd_commentso the summary actually lands on the PR.Why
The PR-menu
/docs-reviewcommand fires anissue_commentevent. gh-aw'ssubmit_pull_request_reviewhandler (submit_pr_review.cjs:130-138→safe_output_helpers.cjs:102-110) only treatspull_request*events as PR context, so a body-only review on anissue_commenttrigger silently drops withNo review context available.create_pull_request_review_commenthandles the same trigger correctly viapayload.issue.pull_request— so before #137, the docs-skills flow always emitted at least one inline comment that set the review context as a side effect.The autonomous Vale-only flow introduced in #137 now produces zero inline comments on clean PRs, which exposes the latent asymmetry. Result: a successful workflow with empty PR output (e.g. https://github.com/elastic/docs-content/actions/runs/25541964378).
Fix
add_commentcorrectly handlesissue_commentpayloads (add_comment.cjsusessupportsPR: true, whichresolveTargetaccepts via theisIssueContextbranch). Routing summary-only outputs there guarantees they post.submit_pull_request_reviewis preserved for runs with at least one inline finding — that path was never broken.Test plan
/docs-reviewon a clean docs PR (no Vale findings) — expect a single PR comment with the summary, no warnings./docs-reviewon a PR with at least one inline-worthy finding — expect inline review comments + a consolidatedCOMMENTreview (unchanged behavior).safe_outputsjob no longer emits theNo review context availableannotation on either run.🤖 Generated with Claude Code