From cf5b4c1e2df2a088edb072d9ed97ec630b0c1ed1 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Fri, 31 May 2024 08:55:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E8=B0=83=E5=9B=BE=E5=BD=A2=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=8C=96-=E8=BF=94=E5=9B=9Elog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/v1/projects/pipelines_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/api/v1/projects/pipelines_controller.rb b/app/controllers/api/v1/projects/pipelines_controller.rb index e5a3de5b1..ba8634629 100644 --- a/app/controllers/api/v1/projects/pipelines_controller.rb +++ b/app/controllers/api/v1/projects/pipelines_controller.rb @@ -32,6 +32,7 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController pipeline_yaml = build_pipeline_yaml(params[:pipeline_name], params[:pipeline_json]) tip_exception("流水线yaml内空不能为空") if pipeline_yaml.blank? @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) interactor = sha.present? ? Gitea::UpdateFileInteractor.call(current_user.gitea_token, @owner.login, content_params("update").merge(sha: sha)) : Gitea::CreateFileInteractor.call(current_user.gitea_token, @owner.login, content_params("create")) tip_exception(interactor.error) unless interactor.success?