fork报错日志跟踪

This commit is contained in:
xxq250 2024-05-08 17:15:04 +08:00
parent 2f880fe068
commit 81b8255a54
1 changed files with 3 additions and 1 deletions

View File

@ -18,6 +18,8 @@ class Projects::ForkService < ApplicationService
:license_id, :ignore_id, {repository: [:identifier, :hidden]}]
result = Gitea::Repository::ForkService.new(@project.owner, @target_owner, @project.identifier, @organization, @new_identifier).call
Rails.logger.info("##### ForkService #{@project.identifier} result======#{result}")
raise Error, 'fork失败' if result.blank? or result['id'].blank?
clone_project.owner = @target_owner
clone_project.forked_from_project_id = @project.id
clone_project.gpid = result['id']
@ -41,7 +43,7 @@ class Projects::ForkService < ApplicationService
clone_project
end
rescue => e
puts "clone project service error: #{e.message}"
Rails.logger.info "fork project service error: #{e.message}"
raise Error, e.message
end