refactor(pr): rely on selected CLI for PR creation
This commit is contained in:
@@ -29,8 +29,6 @@ import {
|
||||
getBranchDiff,
|
||||
detectPlatform,
|
||||
getRemoteHostname,
|
||||
checkCLI,
|
||||
checkAuth,
|
||||
createPR,
|
||||
} from "./src/pr";
|
||||
import type { Platform } from "./src/pr";
|
||||
@@ -489,18 +487,6 @@ async function handlePR(draft: boolean): Promise<void> {
|
||||
platform === "github" ? "GitHub" : platform === "gitlab" ? "GitLab" : "Gitea";
|
||||
console.log(` Using: ${CYAN}${platformLabel}${RESET}`);
|
||||
|
||||
const cliError = checkCLI(platform);
|
||||
if (cliError) {
|
||||
console.error(` ${RED}Error: ${cliError}${RESET}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const authError = await checkAuth(platform);
|
||||
if (authError) {
|
||||
console.error(` ${RED}Error: ${authError}${RESET}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const baseBranch = await getDefaultBranch();
|
||||
const branchName = await getBranchName();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user