构建流水线yaml,保存和更新 log

This commit is contained in:
xxq250 2024-05-23 09:23:21 +08:00
parent f55d69d5cf
commit 2b7414c2fc
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController
@pipeline.yaml = pipeline_yaml
@pipeline.save!
sha = get_pipeline_file_sha(@pipeline.file_name, @pipeline.branch)
Rails.logger.info "sha==========#{sha}"
tip_exception("#{@pipeline.file_name}已存在") if sha
interactor = Gitea::CreateFileInteractor.call(current_user.gitea_token, @owner.login, content_params)
tip_exception(interactor.error) unless interactor.success?