|
|
|
@@ -34,6 +34,8 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController |
|
|
|
tip_exception("流水线yaml内空不能为空") if pipeline_yaml.blank? |
|
|
|
@pipeline.yaml = pipeline_yaml |
|
|
|
sha = get_pipeline_file_sha(@pipeline.file_name, @pipeline.branch) |
|
|
|
Rails.logger.info "sha==========#{sha}" |
|
|
|
Rails.logger.info "sha==========#{sha.present?}" |
|
|
|
interactor = sha.present? ? Gitea::UpdateFileInteractor.call(current_user.gitea_token, @owner.login, content_params) : Gitea::CreateFileInteractor.call(current_user.gitea_token, @owner.login, content_params) |
|
|
|
tip_exception(interactor.error) unless interactor.success? |
|
|
|
render_ok |
|
|
|
|