The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 23:15 UTC
fix(web): name the missing repository in the PR link dialog (#20533)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Scott Norteman committed
Oct 20, 2026 at 00:19 UTC
c7a2fdc6e349e5aee84e99079aae8a16c7e50866
2 files changed
+15
-6
packages/client-runtime/src/pullRequestLinkInput.test.ts
+11
-5
@@ -114,11 +114,17 @@ describe("resolveLinkPullRequestInput", () => {
114
expect(result).toMatchObject({ error: expect.stringContaining("gitlab.com") });
115
});
116
117
- it("asks for a URL when a bare number has no project to resolve against", () => {
118
- expect(
119
- resolveLinkPullRequestInput({ reference: "12", project: null, hasProject: () => true }),
120
- ).toMatchObject({ error: expect.stringContaining("full URL") });
121
- });
117
+ it.each(["12", "#12"])(
118
+ "names the missing repository when resolving bare number %s",
119
+ (reference) => {
120
+ expect(
121
+ resolveLinkPullRequestInput({ reference, project: null, hasProject: () => true }),
122
+ ).toEqual({
123
+ error:
124
+ "Paste the full pull request URL; this thread has no repository to resolve the number against.",
125
+ });
126
+ },
127
+ );
128
129
it("accepts a checkout command as a reference", () => {
130
expect(
packages/client-runtime/src/pullRequestLinkInput.ts
+4
-1
@@ -91,7 +91,10 @@ export function resolveLinkPullRequestInput(input: {
91
const number = Number(parsed);
92
if (!Number.isSafeInteger(number) || number < 1) return null;
93
if (input.project === null) {
94
- return { error: "Paste a full URL to link a pull request from another repository." };
94
+ return {
95
+ error:
96
+ "Paste the full pull request URL; this thread has no repository to resolve the number against.",
97
+ };
98
}
99
const webUrl = input.project.webUrl(number);
100
const webReference = webUrl === null ? null : parseChangeRequestUrl(webUrl);