修复:无法正常转移的问题

This commit is contained in:
2022-10-27 10:48:24 +08:00
parent 7d4c0df691
commit e15809c186
2 changed files with 3 additions and 2 deletions

View File

@@ -51,7 +51,8 @@ class Projects::TransferService < ApplicationService
def gitea_update_owner
begin
@gitea_repo = Gitea::Repository::TransferService.call(owner&.gitea_token, owner&.login, project.identifier, new_owner&.login)
@gitea_repo = $gitea_client.post_repos_transfer_by_owner_repo(owner&.login, project.identifier, {body: {new_owner: new_owner&.login}.to_json})
# @gitea_repo = Gitea::Repository::TransferService.call(owner&.gitea_token, owner&.login, project.identifier, new_owner&.login)
rescue Exception => e
Rails.logger.info("##### Project transfer_service, gitea transfer error #{e}")
end