feat(review): run on non-PR issue targets (#142 slice 3, ADR-0033)#160
Conversation
An @mention on a plain issue (not just a PR thread) now launches a task. The webhook branches on whether the issue carries a pull_request object: a PR thread fetches base/head SHAs for a diff-scoped review (unchanged); a plain issue creates an `issue` task with no SHAs. The rest of the chain already supports it — no diff ⇒ the agent omits add_review_comment and answers via add_comment ⇒ finalize posts a single issue comment (the emergent kind is `ask`). The idempotency key includes target_type, so an issue and a PR with the same number are distinct tasks. Webhook-only + a DB round-trip test; runner unchanged. control-plane 57 (pg17) + webhook unit tests green; fmt + clippy clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
✅ AI Governance check passedThis PR declares AI usage, references a source of truth, and provides verification evidence. Thank you. |
There was a problem hiding this comment.
Code Review
This pull request implements support for handling issue comments on plain GitHub issues (ADR-0033 slice 3) in addition to pull requests. It updates the webhook handler to distinguish between PRs and plain issues, conditionally fetching SHAs only for PRs, and updates the database task creation and logging to use the correct target type. Additionally, a new test has been added to verify that issue tasks round-trip correctly and remain distinct from PR tasks with the same ID. There are no review comments, 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.
1. Summary
Completes #142 (ADR-0033): an
@mentionon a plain issue (not just a PR thread) now launches a task.handle_issue_commentbranches on whether the issue carries apull_requestobject:target_type=pull_request, diff-scoped review (unchanged).target_type=issue, no SHAs.The rest of the chain already supports it: no diff ⇒ the agent omits
add_review_commentand answers viaadd_comment⇒finalizeposts a single issue comment (emergent kindask). The idempotency key includestarget_type, so an issue and a PR with the same number are distinct tasks.Source of truth: #142 / ADR-0033.
2. Intent
3. Scope
In Scope
issue_commenton a non-PR issue →issuetask (no SHAs).Out of Scope
4. Verification
New test: an
issuetask (no SHAs) round-trips viaget_task_context, and a PR with the same number is a distinct task (target_type discriminates the idempotency key).5. Screenshots / Evidence
N/A (backend).
pr_diffreturns None without SHAs (verified) → the diff-less agent path + issue-comment finalize sink (both already in main) carry the rest.6. Risk Assessment
7. AI Usage Declaration
AI was used for:
Human verification:
8. Reviewer Focus
🤖 Generated with Claude Code