review-agent: use review URL instead of opaque GraphQL node ID#78042
Conversation
…lies Review body replies were formatted as "Re: review PRR_kwDOE7ekcc72sY6X" which is meaningless to humans. Switch to using the review URL so replies show a clickable link instead. Duplicate detection checks for both the old node ID and new URL format for backward compatibility. Co-Authored-By: Claude Opus 4.6 <[email protected]>
WalkthroughModified the review-agent script to reference reviews by URL instead of node ID. Extended the GraphQL query to fetch review URLs, updated deduplication logic to match by either ID or URL, and changed response rules to link reviews via URL rather than ID. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 10✅ Passed checks (10 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@ci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh`:
- Around line 469-470: The dedup check using substring matching for replied =
any(str(review_id) in b or (review_url and review_url in b) for b in bot_bodies)
can yield false positives when IDs/URLs share prefixes; change the logic to
perform exact comparisons instead: parse each entry in bot_bodies to extract the
referenced review identifier or full URL (or use a regex with
anchors/word-boundaries) and compare equality against str(review_id) and
review_url, ensuring you update the check in the block that sets replied so it
only returns true for exact matches of review_id or review_url.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 0855ca97-28a1-4417-a0c1-e851a265608e
📒 Files selected for processing (1)
ci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh
|
/retest |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox, enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/pj-rehearse ack |
|
@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@bryan-cox: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
…lies (openshift#78042) Review body replies were formatted as "Re: review PRR_kwDOE7ekcc72sY6X" which is meaningless to humans. Switch to using the review URL so replies show a clickable link instead. Duplicate detection checks for both the old node ID and new URL format for backward compatibility. Co-authored-by: Claude Opus 4.6 <[email protected]>
…lies (openshift#78042) Review body replies were formatted as "Re: review PRR_kwDOE7ekcc72sY6X" which is meaningless to humans. Switch to using the review URL so replies show a clickable link instead. Duplicate detection checks for both the old node ID and new URL format for backward compatibility. Co-authored-by: Claude Opus 4.6 <[email protected]>
…lies (openshift#78042) Review body replies were formatted as "Re: review PRR_kwDOE7ekcc72sY6X" which is meaningless to humans. Switch to using the review URL so replies show a clickable link instead. Duplicate detection checks for both the old node ID and new URL format for backward compatibility. Co-authored-by: Claude Opus 4.6 <[email protected]>
Summary
Re: review PRR_kwDOE7ekcc72sY6Xwhich is an opaque GraphQL node ID meaningless to humans (example)Re: https://github.com/openshift/hypershift/pull/8280#pullrequestreview-4138831511Test plan
PRR_IDsPRR_node IDs are still detected as "already replied" (no duplicate responses)🤖 Generated with Claude Code
Summary by CodeRabbit