The best way to control Claude Code, Codex and more from any computer or phone
[codex] Canonicalize PR number references (#1749)
Danila Yudin committed
Apr 5, 2026 at 05:56 UTC
cd7980b4574a611f9f721d0463755684653b65f2
2 files changed
+3
-3
apps/web/src/pullRequestReference.test.ts
+2
-2
@@ -14,7 +14,7 @@ describe("parsePullRequestReference", () => {
14
});
15
16
it("accepts #number references", () => {
17
- expect(parsePullRequestReference("#42")).toBe("#42");
17
+ expect(parsePullRequestReference("#42")).toBe("42");
18
});
19
20
it("accepts gh pr checkout commands with raw numbers", () => {
@@ -22,7 +22,7 @@ describe("parsePullRequestReference", () => {
22
});
23
24
it("accepts gh pr checkout commands with #number references", () => {
25
- expect(parsePullRequestReference("gh pr checkout #42")).toBe("#42");
25
+ expect(parsePullRequestReference("gh pr checkout #42")).toBe("42");
26
});
27
28
it("accepts gh pr checkout commands with GitHub pull request URLs", () => {
apps/web/src/pullRequestReference.ts
+1
-1
@@ -22,7 +22,7 @@ export function parsePullRequestReference(input: string): string | null {
22
23
const numberMatch = PULL_REQUEST_NUMBER_PATTERN.exec(normalizedInput);
24
if (numberMatch?.[1]) {
25
- return normalizedInput.startsWith("#") ? normalizedInput : numberMatch[1];
25
+ return numberMatch[1];
26
}
27
28
return null;