From b4da7b2e1cd4a7e7a103bc03799a643adfd845b5 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Fri, 8 Mar 2024 17:04:59 +0800 Subject: [PATCH] fix: unable to trigger blueprints with webhooks only (#7148) --- backend/server/services/blueprint.go | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/backend/server/services/blueprint.go b/backend/server/services/blueprint.go index 8e693ab11c5..2f7ddb51a38 100644 --- a/backend/server/services/blueprint.go +++ b/backend/server/services/blueprint.go @@ -320,21 +320,21 @@ func createPipelineByBlueprint(blueprint *models.Blueprint, syncPolicy *models.S newPipeline.SyncPolicy = blueprint.SyncPolicy // if the plan is empty, we should not create the pipeline - var shouldCreatePipeline bool - for _, stage := range plan { - for _, task := range stage { - switch task.Plugin { - case "org", "refdiff", "dora": - default: - if !plan.IsEmpty() { - shouldCreatePipeline = true - } - } - } - } - if !shouldCreatePipeline { - return nil, ErrEmptyPlan - } + // var shouldCreatePipeline bool + // for _, stage := range plan { + // for _, task := range stage { + // switch task.Plugin { + // case "org", "refdiff", "dora": + // default: + // if !plan.IsEmpty() { + // shouldCreatePipeline = true + // } + // } + // } + // } + // if !shouldCreatePipeline { + // return nil, ErrEmptyPlan + // } pipeline, err := CreatePipeline(&newPipeline, false) // Return all created tasks to the User if err != nil {