Repository navigation
Fix fork PR detection for same-name upstreams - #6446
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 185c5c4fa13e8361d22a241ce808bd59442e77ec and 3b48117. 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughTracked-upstream branch parsing was split from retry decision logic. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/github/client.ts (1)
2828-2831: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUpdate the adjacent
Whycomment for same-name fork retries.The guarded retry now covers same-name upstream branches from a different fork owner, but the nearby comment only mentions differently named remote heads.
Suggested comment update
- // Why: worktrees can have a short local branch tracking a differently - // named remote PR head; after the local miss, try that configured head. + // Why: the tracked upstream can identify the real PR head by + // branch name or by fork owner even when branch names match locally.As per coding guidelines, “When writing or modifying code driven by a design doc or non-obvious constraint, add a comment explaining why the code behaves the way it does.”
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6687bb8b-1faa-4b52-ab9f-0fe33e48a4a9
📥 Commits
Reviewing files that changed from the base of the PR and between d188e7d and 185c5c4fa13e8361d22a241ce808bd59442e77ec.
📒 Files selected for processing (2)
src/main/github/client.test.tssrc/main/github/client.ts
185c5c4 to
3b48117
Compare
Co-authored-by: Neil <neil@stably.ai>
Summary
Screenshots
Not applicable; GitHub PR lookup behavior only.
AI Review Report
CodeRabbit reviewed the PR and left one maintainability nit about the adjacent
Whycomment. Addressed in the latest commit.Security Audit
No new inputs, permissions, credential handling, or shell command surfaces. The change reuses existing git/gh execution paths and only changes which already-configured Git remote owner is used for a GitHub PR lookup retry.
Validation
pnpm test -- src/main/github/client.test.ts- 89 passedpnpm test -- src/main/github/gh-utils.test.ts- 35 passedpnpm run lint- passed; existinguseGitStatusPolling.tsexhaustive-deps warning remainspnpm run typecheck- passedgit diff --check HEAD~1..HEAD- cleanElectron validation
Launched the PR Electron app from
C:/Users/neil/orca/workspaces/orca/fix-fork-pr-detectionvia Orca CLI terminal. Verified identity over CDP:name:Orca: brennanb2025/fix-fork-pr-detectiondevRepoRoot:C:\Users\neil\orca\workspaces\orca\fix-fork-pr-detectionhttp://localhost:5173/Imported
C:/Users/neil/source/orcainto that dev app and invoked the samegh.prForBranchpath forbrennanb2025/worktree-remove-fix. Temporary trace showed Electron resolved the tracked upstream asbrennan/brennanb2025/worktree-remove-fix, retried withheadRepo: brennanb2025/orca, and found PR #6433 instablyai/orca. The public result is nownullonly because #6433 is alreadyMERGEDand Orca intentionally hides implicit merged branch matches without a linked PR hint.Notes
This is intentionally GitHub-only. Other hosted review providers continue through their existing provider-specific lookup paths.