mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-18 13:45:23 +02:00
add check for presence of labels
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user