Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Relax remote comparison #41

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion status/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ func EqualRepoURLs(rawurl0, rawurl1 string) bool {
}
u.Scheme, v.Scheme = "", "" // Ignore scheme.
u.User, v.User = nil, nil // Ignore username and password information.
return u.String() == v.String()
// Ignore the .git extension, which GitHub ignores for the git User-Agent.
u.Path, v.Path = strings.TrimSuffix(u.Path, ".git"), strings.TrimSuffix(v.Path, ".git")
return strings.ToLower(u.String()) == strings.ToLower(v.String())
}

// FormatRepoURL tries to rewrite rawurl to follow the same format as layout URL.
Expand Down