forked from Gitlink/forgeplus
修复:导入项目无权限导入失败
This commit is contained in:
parent
125d7dd032
commit
3ede69e436
|
|
@ -19,8 +19,8 @@ class MigrateRemoteRepositoryJob < ApplicationJob
|
|||
UpdateProjectTopicJob.set(wait: 1.seconds).perform_later(project_id) if project_id.present?
|
||||
puts "############ mirror status: #{repo.mirror.status} ############"
|
||||
else
|
||||
gitea_result = $gitea_client.get_repos_by_owner_repo(repo&.project&.owner&.login, repo&.project&.identifier)
|
||||
if gitea_result["empty"]
|
||||
gitea_result = $gitea_client.get_repos_by_owner_repo(repo&.project&.owner&.login, repo&.project&.identifier) rescue nil
|
||||
if gitea_result.nil? || gitea_result["empty"]
|
||||
repo&.mirror&.failed!
|
||||
repo&.project&.update_columns(status: 0)
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue