From 54d16ad6ea1ccddfaf63572294b62aca45b8520e Mon Sep 17 00:00:00 2001 From: Roman Vyakhirev Date: Wed, 15 Jul 2026 15:02:53 +0200 Subject: [PATCH] feat: in non-ci environment don't add username to url, checkout shallow --- automation/utils/src/git.ts | 3 +++ automation/utils/src/steps.ts | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/automation/utils/src/git.ts b/automation/utils/src/git.ts index ef2559e4dd..4acafc68a9 100644 --- a/automation/utils/src/git.ts +++ b/automation/utils/src/git.ts @@ -1,6 +1,9 @@ import { exec } from "./shell"; function getGHRepoAuthUrl(repoUrl: string): string { + if (!process.env.CI) { + return repoUrl; + } const url = new URL(repoUrl); const { GH_USERNAME, GH_PAT } = process.env; if (!GH_USERNAME || !GH_PAT) { diff --git a/automation/utils/src/steps.ts b/automation/utils/src/steps.ts index f63667d7d2..e2520ee09a 100644 --- a/automation/utils/src/steps.ts +++ b/automation/utils/src/steps.ts @@ -46,9 +46,8 @@ export async function cloneTestProject({ info, config }: CommonStepParams): Prom logStep("Clone test project"); const { testProject } = info; - const clone = process.env.CI ? cloneRepoShallow : cloneRepo; rm("-rf", config.paths.targetProject); - await clone({ + await cloneRepoShallow({ remoteUrl: testProject!.githubUrl, branch: testProject!.branchName, localFolder: config.paths.targetProject