mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: add continue to is cloud
This commit is contained in:
@@ -182,8 +182,9 @@ export default async function handler(
|
|||||||
}
|
}
|
||||||
} else if (req.headers["x-github-event"] === "pull_request") {
|
} else if (req.headers["x-github-event"] === "pull_request") {
|
||||||
const prId = githubBody?.pull_request?.id;
|
const prId = githubBody?.pull_request?.id;
|
||||||
|
const action = githubBody?.action;
|
||||||
|
|
||||||
if (githubBody?.action === "closed") {
|
if (action === "closed") {
|
||||||
const previewDeploymentResult =
|
const previewDeploymentResult =
|
||||||
await findPreviewDeploymentsByPullRequestId(prId);
|
await findPreviewDeploymentsByPullRequestId(prId);
|
||||||
|
|
||||||
@@ -203,7 +204,11 @@ export default async function handler(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// opened or synchronize or reopened
|
// opened or synchronize or reopened
|
||||||
if (githubBody?.action === "opened" || githubBody?.action === "synchronize" || githubBody?.action === "reopened") {
|
if (
|
||||||
|
action === "opened" ||
|
||||||
|
action === "synchronize" ||
|
||||||
|
action === "reopened"
|
||||||
|
) {
|
||||||
const repository = githubBody?.repository?.name;
|
const repository = githubBody?.repository?.name;
|
||||||
const deploymentHash = githubBody?.pull_request?.head?.sha;
|
const deploymentHash = githubBody?.pull_request?.head?.sha;
|
||||||
const branch = githubBody?.pull_request?.base?.ref;
|
const branch = githubBody?.pull_request?.base?.ref;
|
||||||
@@ -264,7 +269,7 @@ export default async function handler(
|
|||||||
if (IS_CLOUD && app.serverId) {
|
if (IS_CLOUD && app.serverId) {
|
||||||
jobData.serverId = app.serverId;
|
jobData.serverId = app.serverId;
|
||||||
await deploy(jobData);
|
await deploy(jobData);
|
||||||
return true;
|
continue;
|
||||||
}
|
}
|
||||||
await myQueue.add(
|
await myQueue.add(
|
||||||
"deployments",
|
"deployments",
|
||||||
|
|||||||
Reference in New Issue
Block a user