IsSame compares two GitHub repositories
(a, b Interface)
| 77 | |
| 78 | // IsSame compares two GitHub repositories |
| 79 | func IsSame(a, b Interface) bool { |
| 80 | return strings.EqualFold(a.RepoOwner(), b.RepoOwner()) && |
| 81 | strings.EqualFold(a.RepoName(), b.RepoName()) && |
| 82 | normalizeHostname(a.RepoHost()) == normalizeHostname(b.RepoHost()) |
| 83 | } |
| 84 | |
| 85 | func GenerateRepoURL(repo Interface, p string, args ...interface{}) string { |
| 86 | baseURL := fmt.Sprintf("%s%s/%s", ghinstance.HostPrefix(repo.RepoHost()), repo.RepoOwner(), repo.RepoName()) |