The best way to control Claude Code, Codex and more from any computer or phone
fix(gitlab): `glab mr new` links the new merge request to the thread (#33475)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Arav Jain committed
Nov 14, 2026 at 10:40 UTC
284fb237a527a3798e897b8e8468cc5f0c0ae9eb
2 files changed
+9
-1
packages/source-control-gitlab/src/shared/definition.test.ts
+7
@@ -107,6 +107,13 @@ describe("GitLab CLI commands", () => {
107
}
108
expect(definition.changeRequestCloseCommand.test("glab mr view 7")).toBe(false);
109
});
110
+
111
+ it("recognizes shell creates, including glab's `new` alias", () => {
112
+ for (const command of ["glab mr create --fill --yes", "glab mr new --fill --yes"]) {
113
+ expect(definition.changeRequestCreateCommand.test(command), command).toBe(true);
114
+ }
115
+ expect(definition.changeRequestCreateCommand.test("glab mr view 7")).toBe(false);
116
+ });
117
});
118
119
describe("GitLab remotes", () => {
packages/source-control-gitlab/src/shared/definition.ts
+2
-1
@@ -69,7 +69,8 @@ export const definition = defineSourceControl({
69
checkoutCommand: ({ number }) => `glab mr checkout ${number}`,
70
// `accept` is glab's alias for `merge`.
71
changeRequestCloseCommand: /\bglab\s+mr\s+(?:merge|accept|close)\b/u,
72
- changeRequestCreateCommand: /\bglab\s+mr\s+create\b/u,
72
+ // `new` is glab's alias for `create`.
73
+ changeRequestCreateCommand: /\bglab\s+mr\s+(?:create|new)\b/u,
74
// Bot users, unlike GitHub's, have real profile pages.
75
authorProfileUrl: (login, repositoryUrl) =>
76
new URL(`/${encodeURIComponent(login)}`, repositoryUrl).toString(),