forked from Gitlink/forgeplus
修改gitea创建gitfile的错误捕获
This commit is contained in:
parent
92c76e3438
commit
48f8ce5581
|
@ -19,8 +19,14 @@ namespace :gitea_create_repository do
|
||||||
auto_init: true,
|
auto_init: true,
|
||||||
private: r.hidden,
|
private: r.hidden,
|
||||||
}
|
}
|
||||||
gitea_repository = Gitea::Repository::CreateService.new(user.gitea_token, repository_params).call
|
ActiveRecord::Base.transaction do
|
||||||
puts "__________after_create_gitea_repository_____#{gitea_repository}______"
|
begin
|
||||||
|
gitea_repository = Gitea::Repository::CreateService.new(user.gitea_token, repository_params).call
|
||||||
|
puts "__________after_create_gitea_repository_____#{gitea_repository}______"
|
||||||
|
rescue => e
|
||||||
|
puts "_________create_gitea_git________file______error: #{e}"
|
||||||
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
puts "__________delete_gitea__repository_failed,status:_____#{delete_gitea.status}______"
|
puts "__________delete_gitea__repository_failed,status:_____#{delete_gitea.status}______"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue