You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wt switch pr:xx on a fork does not look at the default repo #2002
As of v0.35, worktrunk now provides a more helpful message when a PR is not found, suggesting that the user set the default for the repository. However, even if this default is set, worktrunk will not actually make use of it. The logs suggest that worktrunk identifies the potential issue when it cannot find the PR, but doesn't check the default repo after that.
Thanks for reporting this! I was able to reproduce the issue and identified the root cause: fetch_pr_info only queried the primary remote (origin) for the PR, ignoring the gh repo set-default configuration entirely — the hint in the error message was misleading.
I've opened #2004 with a fix. wt switch pr:N now checks gh repo set-default --view first and uses that repo for the API call, falling back to the primary remote when no default is set. A maintainer will review it shortly.
Activity
fix: use `gh repo set-default` for PR lookup on forks
worktrunk-bot commentedon Apr 8, 2026
Thanks for reporting this! I was able to reproduce the issue and identified the root cause:
fetch_pr_infoonly queried the primary remote (origin) for the PR, ignoring thegh repo set-defaultconfiguration entirely — the hint in the error message was misleading.I've opened #2004 with a fix.
wt switch pr:Nnow checksgh repo set-default --viewfirst and uses that repo for the API call, falling back to the primary remote when no default is set. A maintainer will review it shortly.fix: use `gh repo set-default` for PR lookup on forks (#2004)
max-sixty commentedon Apr 8, 2026
thanks a lot @JustinPierce ! sorry for the trouble
JustinPierce commentedon Apr 8, 2026
Don't apologize for making my team's adjustment to worktrees easier! We really appreciate the work you've done, here.
max-sixty commentedon Apr 8, 2026
anytime! keep the issues coming!
JustinPierce commentedon Apr 9, 2026
Got the update. Confirmed working. Thank you so much!