流水线关联项目

This commit is contained in:
moshenglv
2021-01-19 11:52:29 +08:00
parent 05416339e5
commit f90bc0897b
6 changed files with 21 additions and 18 deletions

View File

@@ -28,20 +28,12 @@ class Ci::ProjectsController < Ci::BaseController
interactor = Gitea::UpdateFileInteractor.call(current_user.gitea_token, params[:owner], params.merge(identifier: @project.identifier))
if interactor.success?
@file = interactor.result
update_pipeline(params[:pipeline_id])
render_result(1, "更新成功")
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 activate
return render_error('你还未认证') unless current_user.ci_certification?