mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-28 18:45:22 +02:00
Compare commits
4 Commits
v0.29.2
...
fix/webhoo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e2eb7213d | ||
|
|
dcb95374da | ||
|
|
36e131cf12 | ||
|
|
17b4c0fc58 |
@@ -53,9 +53,14 @@ 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 = req.body?.commits?.flatMap(
|
const normalizedCommits =
|
||||||
(commit: any) => commit.modified,
|
req.body?.commits
|
||||||
);
|
?.flatMap((commit: any) => [
|
||||||
|
...(commit.modified || []),
|
||||||
|
...(commit.added || []),
|
||||||
|
...(commit.removed || []),
|
||||||
|
])
|
||||||
|
.filter(Boolean) || [];
|
||||||
|
|
||||||
const shouldDeployPaths = shouldDeploy(
|
const shouldDeployPaths = shouldDeploy(
|
||||||
composeResult.watchPaths,
|
composeResult.watchPaths,
|
||||||
@@ -73,9 +78,14 @@ 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 = req.body?.commits?.flatMap(
|
const normalizedCommits =
|
||||||
(commit: any) => commit.modified,
|
req.body?.commits
|
||||||
);
|
?.flatMap((commit: any) => [
|
||||||
|
...(commit.modified || []),
|
||||||
|
...(commit.added || []),
|
||||||
|
...(commit.removed || []),
|
||||||
|
])
|
||||||
|
.filter(Boolean) || [];
|
||||||
|
|
||||||
const shouldDeployPaths = shouldDeploy(
|
const shouldDeployPaths = shouldDeploy(
|
||||||
composeResult.watchPaths,
|
composeResult.watchPaths,
|
||||||
@@ -124,17 +134,32 @@ export default async function handler(
|
|||||||
let normalizedCommits: string[] = [];
|
let normalizedCommits: string[] = [];
|
||||||
|
|
||||||
if (provider === "github") {
|
if (provider === "github") {
|
||||||
normalizedCommits = req.body?.commits?.flatMap(
|
normalizedCommits =
|
||||||
(commit: any) => commit.modified,
|
req.body?.commits
|
||||||
);
|
?.flatMap((commit: any) => [
|
||||||
|
...(commit.modified || []),
|
||||||
|
...(commit.added || []),
|
||||||
|
...(commit.removed || []),
|
||||||
|
])
|
||||||
|
.filter(Boolean) || [];
|
||||||
} else if (provider === "gitlab") {
|
} else if (provider === "gitlab") {
|
||||||
normalizedCommits = req.body?.commits?.flatMap(
|
normalizedCommits =
|
||||||
(commit: any) => commit.modified,
|
req.body?.commits
|
||||||
);
|
?.flatMap((commit: any) => [
|
||||||
|
...(commit.modified || []),
|
||||||
|
...(commit.added || []),
|
||||||
|
...(commit.removed || []),
|
||||||
|
])
|
||||||
|
.filter(Boolean) || [];
|
||||||
} else if (provider === "gitea") {
|
} else if (provider === "gitea") {
|
||||||
normalizedCommits = req.body?.commits?.flatMap(
|
normalizedCommits =
|
||||||
(commit: any) => commit.modified,
|
req.body?.commits
|
||||||
);
|
?.flatMap((commit: any) => [
|
||||||
|
...(commit.modified || []),
|
||||||
|
...(commit.added || []),
|
||||||
|
...(commit.removed || []),
|
||||||
|
])
|
||||||
|
.filter(Boolean) || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const shouldDeployPaths = shouldDeploy(
|
const shouldDeployPaths = shouldDeploy(
|
||||||
@@ -149,9 +174,14 @@ export default async function handler(
|
|||||||
} else if (sourceType === "gitea") {
|
} else if (sourceType === "gitea") {
|
||||||
const branchName = extractBranchName(req.headers, req.body);
|
const branchName = extractBranchName(req.headers, req.body);
|
||||||
|
|
||||||
const normalizedCommits = req.body?.commits?.flatMap(
|
const normalizedCommits =
|
||||||
(commit: any) => commit.modified,
|
req.body?.commits
|
||||||
);
|
?.flatMap((commit: any) => [
|
||||||
|
...(commit.modified || []),
|
||||||
|
...(commit.added || []),
|
||||||
|
...(commit.removed || []),
|
||||||
|
])
|
||||||
|
.filter(Boolean) || [];
|
||||||
|
|
||||||
const shouldDeployPaths = shouldDeploy(
|
const shouldDeployPaths = shouldDeploy(
|
||||||
composeResult.watchPaths,
|
composeResult.watchPaths,
|
||||||
|
|||||||
@@ -213,9 +213,14 @@ export default async function handler(
|
|||||||
const deploymentTitle = extractCommitMessage(req.headers, req.body);
|
const deploymentTitle = extractCommitMessage(req.headers, req.body);
|
||||||
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 = githubBody?.commits?.flatMap(
|
const normalizedCommits =
|
||||||
(commit: any) => commit.modified,
|
githubBody?.commits
|
||||||
);
|
?.flatMap((commit: any) => [
|
||||||
|
...(commit.modified || []),
|
||||||
|
...(commit.added || []),
|
||||||
|
...(commit.removed || []),
|
||||||
|
])
|
||||||
|
.filter(Boolean) || [];
|
||||||
|
|
||||||
const apps = await db.query.applications.findMany({
|
const apps = await db.query.applications.findMany({
|
||||||
where: and(
|
where: and(
|
||||||
|
|||||||
Reference in New Issue
Block a user