构建流水线yaml,保存和更新,分支参数

This commit is contained in:
xxq250 2024-05-23 09:20:48 +08:00
parent 4c956e48ae
commit f55d69d5cf
1 changed files with 3 additions and 1 deletions

View File

@ -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,