diff --git a/apps/dokploy/pages/api/deploy/github.ts b/apps/dokploy/pages/api/deploy/github.ts index 6430255f1..5ea99989e 100644 --- a/apps/dokploy/pages/api/deploy/github.ts +++ b/apps/dokploy/pages/api/deploy/github.ts @@ -443,17 +443,19 @@ export default async function handler( for (const app of secureApps) { // check for labels - let hasLabel: boolean = false; - const labels = githubBody?.pull_request?.labels; - const previewLabels = app?.previewLabels?.split(","); - for (const label of labels) { - if (previewLabels.contains(label.name)) { - hasLabel = true; - break; + if (app?.previewLabels != "") { + const previewLabels = app?.previewLabels?.split(","); + let hasLabel: boolean = false; + const labels = githubBody?.pull_request?.labels; + for (const label of labels) { + if (previewLabels.contains(label.name)) { + hasLabel = true; + break; + } } - } - if (hasLabel) - continue; + if (hasLabel) + continue; + } const previewLimit = app?.previewLimit || 0; if (app?.previewDeployments?.length > previewLimit) {