Merge pull request '【devops】可视化创建流水线' (#13) from trustie-pipeline into develop

Reviewed-on: https://git.trustie.net/jasder/forgeplus/pulls/13
This commit is contained in:
jasder
2021-01-20 16:01:21 +08:00
30 changed files with 1225 additions and 3 deletions

View File

@@ -95,11 +95,22 @@ class RepositoriesController < ApplicationController
if interactor.success?
@file = interactor.result
# create_new_pr(params)
#如果是更新流水线文件
if params[:pipeline_id]
update_pipeline(params[:pipeline_id])
end
else
render_error(interactor.error)
end
end
def update_pipeline(pipeline_id)
pipeline = Ci::Pipeline.find(pipeline_id)
if pipeline
pipeline.update!(sync: 1)
end
end
def update_file
interactor = Gitea::UpdateFileInteractor.call(current_user.gitea_token, @owner.login, params.merge(identifier: @project.identifier))
if interactor.success?