修复:split nil错误

This commit is contained in:
2024-09-19 16:52:46 +08:00
parent 441ced217b
commit 8264bb8107
2 changed files with 18 additions and 1 deletions

View File

@@ -21,7 +21,7 @@ class Projects::VerifyAuthTokenService < ApplicationService
private
def regular_url
regx = /\/\/[\s\S]*.git$/ #获取字串
data = (regx.match @url).to_s[2..-5].split("/")
data = (regx.match @url).to_s[2..-5].to_s.split("/")
@website = data[0]
@owner = data[1]
@repo = data[2]