Skip to content

Commit 23aaf8f

Browse files
apolis-debugclaude
andcommitted
fix(forgejo): tea's pull and co aliases count as checkout commands
tea accepts `pull` for `pulls` and `co` for `checkout`, but the Forgejo checkout-command pattern only knew `pr`/`pulls` and `checkout`, so the link box rejected those spellings. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 25bf84a commit 23aaf8f

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

‎packages/source-control-forgejo/src/shared/definition.test.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,17 @@ describe("Forgejo CLI commands", () => {
133133
}
134134
expect(definition.changeRequestCloseCommand.test("tea pull checkout 7")).toBe(false);
135135
});
136+
137+
it("reads the change request from every checkout spelling tea accepts", () => {
138+
for (const command of [
139+
"tea pulls checkout 7",
140+
"tea pull checkout 7",
141+
"tea pr co 7",
142+
"tea pull co 7",
143+
]) {
144+
expect(definition.checkoutCommandArgument(command), command).toBe("7");
145+
}
146+
});
136147
});
137148

138149
describe("Forgejo change request host", () => {

‎packages/source-control-forgejo/src/shared/definition.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
} from "@t3tools/source-control-core/shared/definition";
1616
import { icon } from "./icon.ts";
1717

18-
const CHECKOUT_COMMAND = /^tea\s+(?:pr|pulls)\s+checkout\s+(.+)$/i;
18+
const CHECKOUT_COMMAND = /^tea\s+(?:pr|pulls?)\s+(?:checkout|co)\s+(.+)$/i;
1919
const CHANGE_REQUEST_REFERENCE =
2020
/^https?:\/\/[^/\s]+\/(?:[^/\s]+\/)+[^/\s]+\/pulls\/(\d+)(?:[/?#].*)?$/i;
2121

0 commit comments

Comments
 (0)