Skip to content

Add leftover pending-review check to review commands#655

Open
apstndb wants to merge 1 commit into
mainfrom
review-pending-submit-check
Open

Add leftover pending-review check to review commands#655
apstndb wants to merge 1 commit into
mainfrom
review-pending-submit-check

Conversation

@apstndb

@apstndb apstndb commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • /review-respond resolves review threads via gh-helper threads reply --resolve, but if a reply is left in an unsubmitted (PENDING) review, the thread is resolved while the reply stays invisible (pending reviews are only visible to their author). This produced "resolved threads with no visible reply" on PR Stream non-table output by default #648.
  • Add a guard to catch the missing submit:
    • review-respond.md: new verification step that detects leftover PENDING reviews after replying/resolving and submits them before requesting a new review.
    • review-status.md: surfaces PENDING reviews in the status output so the situation is visible during monitoring.

Detection command

PR=$(gh pr view --json number -q .number) && \
gh api --paginate "repos/{owner}/{repo}/pulls/$PR/reviews" \
  --jq '[.[] | select(.state=="PENDING")] | {pendingReviews: map({id, html_url})}'

gh-helper reviews has no equivalent subcommand (only fetch/wait), so this uses gh api. GitHub only returns the caller's own pending reviews, so the state == "PENDING" filter is sufficient.

Validation

  • make check (test + lint + fmt-check) — pass
  • Detection command verified against PR Stream non-table output by default #648 (now clean: {"pendingReviews":[]}) and on a live branch (auto-resolves the PR number).

🤖 Generated with Claude Code

`/review-respond` runs `gh-helper threads reply --resolve`, which resolves a
thread even when the reply ends up batched into an unsubmitted (PENDING) review
instead of being posted directly. Because GitHub only shows a pending review to
its author, the result is resolved threads with no visible reply.

Add a verification step so the missing submit is caught:

- review-respond.md: after replying/resolving, detect leftover PENDING reviews
  and submit them before requesting a new review.
- review-status.md: surface PENDING reviews in the status output.

Detection uses `gh api .../reviews` filtered to state == "PENDING" (gh-helper
reviews has only fetch/wait; GitHub returns only the caller's own pending
reviews, so the state filter is sufficient).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@apstndb apstndb added ignore-for-release Exclude from automatic release notes generation docs-dev Developer/internal documentation (dev-docs/, CLAUDE.md) labels Jun 5, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the '.claude/commands/review-respond.md' and '.claude/commands/review-status.md' files to include instructions and commands for checking and submitting unsubmitted (PENDING) GitHub reviews. This ensures that drafted replies are not left invisible to other users. There are no review comments to address, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

Code Metrics Report

📊 View detailed coverage report (available for 7 days)

main (d963687) #655 (9029f91) +/-
Coverage 70.3% 70.3% 0.0%
Code to Test Ratio 1:1.2 1:1.2 0.0
Test Execution Time 41s 46s +5s
Details
  |                     | main (d963687) | #655 (9029f91) | +/-  |
  |---------------------|----------------|----------------|------|
  | Coverage            |          70.3% |          70.3% | 0.0% |
  |   Files             |             83 |             83 |    0 |
  |   Lines             |           7390 |           7390 |    0 |
  |   Covered           |           5199 |           5199 |    0 |
  | Code to Test Ratio  |          1:1.2 |          1:1.2 |  0.0 |
  |   Code              |          17076 |          17076 |    0 |
  |   Test              |          21963 |          21963 |    0 |
- | Test Execution Time |            41s |            46s |  +5s |

Reported by octocov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-dev Developer/internal documentation (dev-docs/, CLAUDE.md) ignore-for-release Exclude from automatic release notes generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant