fix(ui): link #123 and @user refs to the repo's actual forge (#1596) (#1597)
* fix(ui): link #123 and @user refs to the repo's actual forge (#1596) Bare issue and mention refs always linked to github.com, so GitLab and GitHub Enterprise repos got links to the wrong forge. A new browser-safe core helper, forgeRefLinks, picks the forge from the remote host: GitHub-like hosts link to /issues/N, GitLab-like hosts to /-/issues/N, unrecognized hosts render unlinked, and an absent host keeps the old github.com behavior. The host classification is shared with the commit avatar lookup. InlineMarkdown gains an optional repoHost prop threaded from Viewer's repoInfo.host, and Pi's getRepoInfo now reports the host. * fix(ui): keep github.com ref links for aliased and credentialed remotes Using the remote host for the first time exposed remote spellings the parser and classifier did not handle, so common github.com remotes stopped linking to github.com: SSH-config aliases (github.com-work, dotless work-gh), credentials in https URLs, ssh.github.com and www.github.com, uppercase hosts, and bracketed hosts. parseRemoteHost now strips URL userinfo, and core normalizes the host before classifying it: lowercase, drop the port, fold the public forges' alias hosts onto github.com / gitlab.com, and treat anything that is not a plausible DNS name as absent, which keeps the legacy github.com link. The commit-avatar lookup uses the same normalization.
M
Michael Ramos committed
dd340515d802616e4c956aa9cf182f8a0f22d379
Parent: c22ec4c
Committed by GitHub <noreply@github.com>
on 9/23/2026, 1:37:30 AM