Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gadost committed Feb 10, 2022
1 parent 6a6ca09 commit 69d84c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions watcher/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ func Parse(u string) repoInfo {
u = u[:len(u)-1]
}

var re = regexp.MustCompile(`^(https|git)(:\/\/|@)(?P<domain>[^\/:]+)[\/:](?P<Owner>[^\/:]+)\/(?P<RepoName>.+)$`)
var re = regexp.MustCompile(`^(https|git)(:\/\/|@)(?P<Domain>[^\/:]+)[\/:](?P<Owner>[^\/:]+)\/(?P<RepoName>.+)$`)
match := re.FindStringSubmatch(u)

results := map[string]string{}
for i, name := range match {
results[re.SubexpNames()[i]] = name
}

return repoInfo{Domain: results["domain"], Owner: results["Owner"], RepoName: results["RepoName"]}
return repoInfo{Domain: results["Domain"], Owner: results["Owner"], RepoName: results["RepoName"]}
}

// Monitor check github releases
Expand Down

0 comments on commit 69d84c8

Please sign in to comment.