@devries-cameron20 / t3code-1 / commits / 168bcd630c
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(github): `gh pr new` links the new pull request to the thread (#33474)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: maria-rcks <maria@kuuro.net>

Arav Jain committed Nov 11, 2026 at 17:15 UTC 168bcd630cae9b6b08166ea3b5a3e42ee12070a5
2 files changed +11 -1
packages/source-control-github/src/shared/definition.test.ts
+9
@@ -96,6 +96,15 @@ describe("GitHub change request URLs", () => {
96 });
97 });
98
99 +describe("GitHub CLI commands", () => {
100 + it("recognizes shell pull request creates, including gh's `new` alias", () => {
101 + for (const command of ["gh pr create --fill", "gh pr new --fill"]) {
102 + expect(definition.changeRequestCreateCommand.test(command), command).toBe(true);
103 + }
104 + expect(definition.changeRequestCreateCommand.test("gh pr view 7")).toBe(false);
105 + });
106 +});
107 +
108 describe("GitHub repository pages", () => {
109 it("leaves the tree route on other hosts to them", () => {
110 expect(
packages/source-control-github/src/shared/definition.ts
+2 -1
@@ -125,7 +125,8 @@ export const definition = defineSourceControl({
125 ] as const),
126 checkoutCommand: ({ number }) => `gh pr checkout ${number}`,
127 changeRequestCloseCommand: /\bgh\s+(?:pr\s+(?:merge|close)|stack\s+merge)\b/u,
128 - changeRequestCreateCommand: /\bgh\s+pr\s+create\b/u,
128 + // `new` is gh's alias for `create`.
129 + changeRequestCreateCommand: /\bgh\s+pr\s+(?:create|new)\b/u,
130 authorProfileUrl: (login, repositoryUrl) =>
131 login.endsWith("[bot]")
132 ? null