feat(pr): add GitLab support

This commit is contained in:
2026-06-11 19:38:36 +08:00
parent c8626ff69a
commit 1dbfac7985
4 changed files with 82 additions and 9 deletions
+3 -1
View File
@@ -333,6 +333,7 @@ async function selectPlatform(hostname: string): Promise<Platform | null> {
items: [
{ label: "GitHub", value: "github" as Platform, description: "Use gh CLI" },
{ label: "Gitea", value: "gitea" as Platform, description: "Use tea CLI" },
{ label: "GitLab", value: "gitlab" as Platform, description: "Use glab CLI" },
],
});
}
@@ -484,7 +485,8 @@ async function handlePR(draft: boolean): Promise<void> {
platform = chosen;
}
const platformLabel = platform === "github" ? "GitHub" : "Gitea";
const platformLabel =
platform === "github" ? "GitHub" : platform === "gitlab" ? "GitLab" : "Gitea";
console.log(` Using: ${CYAN}${platformLabel}${RESET}`);
const cliError = checkCLI(platform);