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
Commit 7a42c0f
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(clients): pull request surfaces ask the forge instead of assuming GitHub
Web and mobile pull request screens still branched on `provider === "github"` and
hostname literals: two different GitHub autolink grammars (one in shared, one in
web), a mobile review guide that ran GitHub autolinking against every host, a
GitHub-only checks link and diff-stats filter, GitHub-only list fallbacks, and
link icons, search terms, error filters and clone shorthand hardcoded to GitHub.
Each of those now asks the source control client definition:
- `referenceAutolinks(text, repositoryUrl)` replaces `referenceAutolinkRepositoryUrl`.
GitHub implements it (moved from `@t3tools/shared/githubMarkdownLinks`); web's
remark plugin and mobile's markdown rewrite both call it through
`changeRequestReferenceAutolinker`. Other hosts link nothing.
- `changeRequestChecksUrl`, `changeRequestActionsWhenUnreported` and
`changeRequestListScope` carry the GitHub-only checks route, old-server quick
actions and host-wide list reads.
- `findByPublicDomain` names the host of a link (subdomains included), used for
link and theme-source icons on web and mobile.
- Command palette terms, the tool-failure filter, the thread status provider
name and the clone shorthand come from the definitions.
Behaviour changes: the mobile review guide no longer GitHub-links GitLab/Forgejo
text; web pull request markdown gains GitHub's full grammar (cross-repository
references, short SHAs, mentions) and mobile shows full SHAs as seven characters;
mobile asks every host for diff stats; gitlab.com/codeberg.org/bitbucket.org links
show their host's mark; the bot filter trusts the server's `isBot`.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
expect(linkReferenceAutolinks("Closes #123, see @julius",github)).toBe(
14
+
"Closes [#123](https://github.com/team/repo/issues/123), see [@julius](https://github.com/julius)",
15
+
);
16
+
});
17
+
18
+
it("leaves code, links, images, escapes and definitions alone",()=>{
it("does not nest links inside HTML anchors or code",()=>{
25
+
consttext='See <a href="https://example.com">#12</a> and <code>#13</code>, then #14.';
26
+
expect(linkReferenceAutolinks(text,github)).toBe(
27
+
'See <a href="https://example.com">#12</a> and <code>#13</code>, then [#14](https://github.com/team/repo/issues/14).',
28
+
);
29
+
});
30
+
31
+
it("leaves markdown unchanged for a host that links nothing",()=>{
0 commit comments