[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2025-03-30 08:51:24 +00:00
committed by GitHub
parent 64a77decfd
commit 67e85cabcb
4 changed files with 76 additions and 47 deletions

View File

@@ -90,8 +90,14 @@ export const cloneGitlabRepository = async (
isCompose = false,
) => {
const writeStream = createWriteStream(logPath, { flags: "a" });
const { appName, gitlabBranch, gitlabId, gitlab, gitlabPathNamespace, recurseSubmodules = true } =
entity;
const {
appName,
gitlabBranch,
gitlabId,
gitlab,
gitlabPathNamespace,
recurseSubmodules = true,
} = entity;
if (!gitlabId) {
throw new TRPCError({
@@ -140,15 +146,11 @@ export const cloneGitlabRepository = async (
if (recurseSubmodules) {
cloneArgs.splice(4, 0, "--recurse-submodules");
}
await spawnAsync(
"git",
cloneArgs,
(data) => {
if (writeStream.writable) {
writeStream.write(data);
}
},
);
await spawnAsync("git", cloneArgs, (data) => {
if (writeStream.writable) {
writeStream.write(data);
}
});
writeStream.write(`\nCloned ${repoclone}: ✅\n`);
} catch (error) {
writeStream.write(`ERROR Clonning: ${error}: ❌`);
@@ -330,7 +332,13 @@ export const getGitlabBranches = async (input: {
};
export const cloneRawGitlabRepository = async (entity: Compose) => {
const { appName, gitlabBranch, gitlabId, gitlabPathNamespace, recurseSubmodules = true } = entity;
const {
appName,
gitlabBranch,
gitlabId,
gitlabPathNamespace,
recurseSubmodules = true,
} = entity;
if (!gitlabId) {
throw new TRPCError({
@@ -371,7 +379,14 @@ export const cloneRawGitlabRepository = async (entity: Compose) => {
};
export const cloneRawGitlabRepositoryRemote = async (compose: Compose) => {
const { appName, gitlabPathNamespace, branch, gitlabId, serverId, recurseSubmodules = true } = compose;
const {
appName,
gitlabPathNamespace,
branch,
gitlabId,
serverId,
recurseSubmodules = true,
} = compose;
if (!serverId) {
throw new TRPCError({