[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2026-04-05 19:41:38 +00:00
committed by GitHub
parent dcb95374da
commit 3e2eb7213d
2 changed files with 37 additions and 23 deletions

View File

@@ -54,11 +54,13 @@ export default async function handler(
if (sourceType === "github") { if (sourceType === "github") {
const branchName = extractBranchName(req.headers, req.body); const branchName = extractBranchName(req.headers, req.body);
const normalizedCommits = const normalizedCommits =
req.body?.commits?.flatMap((commit: any) => [ req.body?.commits
?.flatMap((commit: any) => [
...(commit.modified || []), ...(commit.modified || []),
...(commit.added || []), ...(commit.added || []),
...(commit.removed || []), ...(commit.removed || []),
]).filter(Boolean) || []; ])
.filter(Boolean) || [];
const shouldDeployPaths = shouldDeploy( const shouldDeployPaths = shouldDeploy(
composeResult.watchPaths, composeResult.watchPaths,
@@ -77,11 +79,13 @@ export default async function handler(
} else if (sourceType === "gitlab") { } else if (sourceType === "gitlab") {
const branchName = extractBranchName(req.headers, req.body); const branchName = extractBranchName(req.headers, req.body);
const normalizedCommits = const normalizedCommits =
req.body?.commits?.flatMap((commit: any) => [ req.body?.commits
?.flatMap((commit: any) => [
...(commit.modified || []), ...(commit.modified || []),
...(commit.added || []), ...(commit.added || []),
...(commit.removed || []), ...(commit.removed || []),
]).filter(Boolean) || []; ])
.filter(Boolean) || [];
const shouldDeployPaths = shouldDeploy( const shouldDeployPaths = shouldDeploy(
composeResult.watchPaths, composeResult.watchPaths,
@@ -131,25 +135,31 @@ export default async function handler(
if (provider === "github") { if (provider === "github") {
normalizedCommits = normalizedCommits =
req.body?.commits?.flatMap((commit: any) => [ req.body?.commits
...(commit.modified || []), ?.flatMap((commit: any) => [
...(commit.added || []), ...(commit.modified || []),
...(commit.removed || []), ...(commit.added || []),
]).filter(Boolean) || []; ...(commit.removed || []),
])
.filter(Boolean) || [];
} else if (provider === "gitlab") { } else if (provider === "gitlab") {
normalizedCommits = normalizedCommits =
req.body?.commits?.flatMap((commit: any) => [ req.body?.commits
...(commit.modified || []), ?.flatMap((commit: any) => [
...(commit.added || []), ...(commit.modified || []),
...(commit.removed || []), ...(commit.added || []),
]).filter(Boolean) || []; ...(commit.removed || []),
])
.filter(Boolean) || [];
} else if (provider === "gitea") { } else if (provider === "gitea") {
normalizedCommits = normalizedCommits =
req.body?.commits?.flatMap((commit: any) => [ req.body?.commits
...(commit.modified || []), ?.flatMap((commit: any) => [
...(commit.added || []), ...(commit.modified || []),
...(commit.removed || []), ...(commit.added || []),
]).filter(Boolean) || []; ...(commit.removed || []),
])
.filter(Boolean) || [];
} }
const shouldDeployPaths = shouldDeploy( const shouldDeployPaths = shouldDeploy(
@@ -165,11 +175,13 @@ export default async function handler(
const branchName = extractBranchName(req.headers, req.body); const branchName = extractBranchName(req.headers, req.body);
const normalizedCommits = const normalizedCommits =
req.body?.commits?.flatMap((commit: any) => [ req.body?.commits
?.flatMap((commit: any) => [
...(commit.modified || []), ...(commit.modified || []),
...(commit.added || []), ...(commit.added || []),
...(commit.removed || []), ...(commit.removed || []),
]).filter(Boolean) || []; ])
.filter(Boolean) || [];
const shouldDeployPaths = shouldDeploy( const shouldDeployPaths = shouldDeploy(
composeResult.watchPaths, composeResult.watchPaths,

View File

@@ -214,11 +214,13 @@ export default async function handler(
const deploymentHash = extractHash(req.headers, req.body); const deploymentHash = extractHash(req.headers, req.body);
const owner = githubBody?.repository?.owner?.name; const owner = githubBody?.repository?.owner?.name;
const normalizedCommits = const normalizedCommits =
githubBody?.commits?.flatMap((commit: any) => [ githubBody?.commits
?.flatMap((commit: any) => [
...(commit.modified || []), ...(commit.modified || []),
...(commit.added || []), ...(commit.added || []),
...(commit.removed || []), ...(commit.removed || []),
]).filter(Boolean) || []; ])
.filter(Boolean) || [];
const apps = await db.query.applications.findMany({ const apps = await db.query.applications.findMany({
where: and( where: and(