From 2c7d76b682995232e8d6964bcc8229034759c4bf Mon Sep 17 00:00:00 2001 From: xxq250 Date: Tue, 26 May 2026 17:15:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=B7=A5=E5=8E=82=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=BF=87=E7=9A=84=E6=B5=81=E6=B0=B4=E7=BA=BF=E4=BB=A3?= =?UTF-8?q?=E7=A0=81,=E8=AF=AD=E6=B3=95=E6=9A=82=E4=B8=8D=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/v1/projects/pipelines_controller.rb | 8 ++++---- .../concerns/api/action_validator_helper.rb | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/controllers/api/v1/projects/pipelines_controller.rb b/app/controllers/api/v1/projects/pipelines_controller.rb index dfd54308b..893003b10 100644 --- a/app/controllers/api/v1/projects/pipelines_controller.rb +++ b/app/controllers/api/v1/projects/pipelines_controller.rb @@ -115,10 +115,10 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController @pipeline.pipeline_name = params[:pipeline_name] if params[:pipeline_name].present? pipeline_yaml = params[:pipeline_yaml].present? ? params[:pipeline_yaml] : build_pipeline_yaml_new(@pipeline.pipeline_name, params[:pipeline_json]) tip_exception("流水线yaml内空不能为空") if pipeline_yaml.blank? - result = validate_string(pipeline_yaml, @pipeline.branch, @project.default_branch) - unless result[:valid] - tip_exception(result[:errors].join(",")) - end + # result = validate_string(pipeline_yaml, @pipeline.branch, @project.default_branch) + # unless result[:valid] + # tip_exception(result[:errors].join(",")) + # end @pipeline.yaml = pipeline_yaml #Rails.logger.info "pipeline_yaml base64=========================#{Base64.encode64(@pipeline.yaml).gsub(/\n/, '')}" sha = get_pipeline_file_sha(@pipeline.file_name, @pipeline.branch) diff --git a/app/controllers/concerns/api/action_validator_helper.rb b/app/controllers/concerns/api/action_validator_helper.rb index f0e7ae752..a4332c249 100644 --- a/app/controllers/concerns/api/action_validator_helper.rb +++ b/app/controllers/concerns/api/action_validator_helper.rb @@ -74,13 +74,13 @@ module Api::ActionValidatorHelper Rails.logger.info "data==true#{data[true]}" if data[true] if data[true]['push'] - unless data[true]['push'].key?('branches') - errors << "push触发器缺少branches配置" - end - - unless data[true]['push'].key?('paths-ignore') - errors << "push触发器缺少paths-ignore配置" - end + # unless data[true]['push'].key?('branches') + # errors << "push触发器缺少branches配置" + # end + # + # unless data[true]['push'].key?('paths-ignore') + # errors << "push触发器缺少paths-ignore配置" + # end end if data[true]['schedule'] && branch != default_branch errors << "只有#{default_branch}分支支持定时触发器"