From 4ad6b265c717e1ec96c18b4ae244f5cb54b0a876 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Wed, 22 May 2024 16:11:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E6=B5=81=E6=B0=B4=E7=BA=BFjs?= =?UTF-8?q?on=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/v1/projects/pipelines_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/v1/projects/pipelines_controller.rb b/app/controllers/api/v1/projects/pipelines_controller.rb index 4807ba2e6..296166e52 100644 --- a/app/controllers/api/v1/projects/pipelines_controller.rb +++ b/app/controllers/api/v1/projects/pipelines_controller.rb @@ -23,9 +23,9 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController end def build_yaml - Rails.logger.info("pipeline===========#{params[:pipeline].present?}") - if params[:pipeline].present? - pipeline = params[:pipeline] + Rails.logger.info("pipeline===========#{params[:pipeline_json].present?}") + if params[:pipeline_json].present? + pipeline = params[:pipeline_json] @name = params[:name] params_nodes = JSON.parse(pipeline)["nodes"].select { |node| !["on-push", "on-schedule"].include?(node["component_name"]) } on_nodes = JSON.parse(pipeline)["nodes"].select { |node| ["on-push", "on-schedule"].include?(node["component_name"]) }