From 3e2eb7213d759f4ff69719f09286e8b0c83e30e1 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sun, 5 Apr 2026 19:41:38 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- .../api/deploy/compose/[refreshToken].ts | 54 +++++++++++-------- apps/dokploy/pages/api/deploy/github.ts | 6 ++- 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts b/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts index 9c1fb5207..eb61f0851 100644 --- a/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts +++ b/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts @@ -54,11 +54,13 @@ export default async function handler( if (sourceType === "github") { const branchName = extractBranchName(req.headers, req.body); const normalizedCommits = - req.body?.commits?.flatMap((commit: any) => [ + req.body?.commits + ?.flatMap((commit: any) => [ ...(commit.modified || []), ...(commit.added || []), ...(commit.removed || []), - ]).filter(Boolean) || []; + ]) + .filter(Boolean) || []; const shouldDeployPaths = shouldDeploy( composeResult.watchPaths, @@ -77,11 +79,13 @@ export default async function handler( } else if (sourceType === "gitlab") { const branchName = extractBranchName(req.headers, req.body); const normalizedCommits = - req.body?.commits?.flatMap((commit: any) => [ + req.body?.commits + ?.flatMap((commit: any) => [ ...(commit.modified || []), ...(commit.added || []), ...(commit.removed || []), - ]).filter(Boolean) || []; + ]) + .filter(Boolean) || []; const shouldDeployPaths = shouldDeploy( composeResult.watchPaths, @@ -131,25 +135,31 @@ export default async function handler( if (provider === "github") { normalizedCommits = - req.body?.commits?.flatMap((commit: any) => [ - ...(commit.modified || []), - ...(commit.added || []), - ...(commit.removed || []), - ]).filter(Boolean) || []; + req.body?.commits + ?.flatMap((commit: any) => [ + ...(commit.modified || []), + ...(commit.added || []), + ...(commit.removed || []), + ]) + .filter(Boolean) || []; } else if (provider === "gitlab") { normalizedCommits = - req.body?.commits?.flatMap((commit: any) => [ - ...(commit.modified || []), - ...(commit.added || []), - ...(commit.removed || []), - ]).filter(Boolean) || []; + req.body?.commits + ?.flatMap((commit: any) => [ + ...(commit.modified || []), + ...(commit.added || []), + ...(commit.removed || []), + ]) + .filter(Boolean) || []; } else if (provider === "gitea") { normalizedCommits = - req.body?.commits?.flatMap((commit: any) => [ - ...(commit.modified || []), - ...(commit.added || []), - ...(commit.removed || []), - ]).filter(Boolean) || []; + req.body?.commits + ?.flatMap((commit: any) => [ + ...(commit.modified || []), + ...(commit.added || []), + ...(commit.removed || []), + ]) + .filter(Boolean) || []; } const shouldDeployPaths = shouldDeploy( @@ -165,11 +175,13 @@ export default async function handler( const branchName = extractBranchName(req.headers, req.body); const normalizedCommits = - req.body?.commits?.flatMap((commit: any) => [ + req.body?.commits + ?.flatMap((commit: any) => [ ...(commit.modified || []), ...(commit.added || []), ...(commit.removed || []), - ]).filter(Boolean) || []; + ]) + .filter(Boolean) || []; const shouldDeployPaths = shouldDeploy( composeResult.watchPaths, diff --git a/apps/dokploy/pages/api/deploy/github.ts b/apps/dokploy/pages/api/deploy/github.ts index 9a0dce1f5..7c6de13f8 100644 --- a/apps/dokploy/pages/api/deploy/github.ts +++ b/apps/dokploy/pages/api/deploy/github.ts @@ -214,11 +214,13 @@ export default async function handler( const deploymentHash = extractHash(req.headers, req.body); const owner = githubBody?.repository?.owner?.name; const normalizedCommits = - githubBody?.commits?.flatMap((commit: any) => [ + githubBody?.commits + ?.flatMap((commit: any) => [ ...(commit.modified || []), ...(commit.added || []), ...(commit.removed || []), - ]).filter(Boolean) || []; + ]) + .filter(Boolean) || []; const apps = await db.query.applications.findMany({ where: and(