From f55d69d5cf522e04a7c2d644366b51255619e8fc Mon Sep 17 00:00:00 2001 From: xxq250 Date: Thu, 23 May 2024 09:20:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E6=B5=81=E6=B0=B4=E7=BA=BFya?= =?UTF-8?q?ml=EF=BC=8C=E4=BF=9D=E5=AD=98=E5=92=8C=E6=9B=B4=E6=96=B0,?= =?UTF-8?q?=E5=88=86=E6=94=AF=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/v1/projects/pipelines_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/v1/projects/pipelines_controller.rb b/app/controllers/api/v1/projects/pipelines_controller.rb index 97a671d52..4f2895843 100644 --- a/app/controllers/api/v1/projects/pipelines_controller.rb +++ b/app/controllers/api/v1/projects/pipelines_controller.rb @@ -134,12 +134,14 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController if interactor.success? file = interactor.result file['sha'] + else + nil end end def content_params { - filepath: ".gitea/workflows/#{@pipeline.pipeline_name}.yaml", + filepath: ".gitea/workflows/#{URI.parse(@pipeline.pipeline_name)}.yaml", branch: @pipeline.branch, new_branch: @pipeline.branch, content: @pipeline.yaml,