mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-01 09:42:16 +00: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) {
|
for (const app of secureApps) {
|
||||||
// check for labels
|
// check for labels
|
||||||
let hasLabel: boolean = false;
|
if (app?.previewLabels != "") {
|
||||||
const labels = githubBody?.pull_request?.labels;
|
const previewLabels = app?.previewLabels?.split(",");
|
||||||
const previewLabels = app?.previewLabels?.split(",");
|
let hasLabel: boolean = false;
|
||||||
for (const label of labels) {
|
const labels = githubBody?.pull_request?.labels;
|
||||||
if (previewLabels.contains(label.name)) {
|
for (const label of labels) {
|
||||||
hasLabel = true;
|
if (previewLabels.contains(label.name)) {
|
||||||
break;
|
hasLabel = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if (hasLabel)
|
||||||
if (hasLabel)
|
continue;
|
||||||
continue;
|
}
|
||||||
|
|
||||||
const previewLimit = app?.previewLimit || 0;
|
const previewLimit = app?.previewLimit || 0;
|
||||||
if (app?.previewDeployments?.length > previewLimit) {
|
if (app?.previewDeployments?.length > previewLimit) {
|
||||||
|
|||||||
Reference in New Issue
Block a user