diff --git a/go.sum b/go.sum index d5428116..a62c313c 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,4 @@ +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/cmd/scripts/validate-contributor-readmes.go b/scripts/validate-contributor-readmes/main.go similarity index 97% rename from cmd/scripts/validate-contributor-readmes.go rename to scripts/validate-contributor-readmes/main.go index 87bf3e01..940b123c 100644 --- a/cmd/scripts/validate-contributor-readmes.go +++ b/scripts/validate-contributor-readmes/main.go @@ -25,7 +25,7 @@ type contributorProfileFrontmatter struct { DisplayName string `yaml:"display_name"` Bio string `yaml:"bio"` GithubUsername string `yaml:"github"` - AvatarUrl *string `yaml:"avatar"` + AvatarUrl *string `yaml:"avatar"` // Script assumes that if value is nil, the Registry site build step will backfill the value with the user's GitHub avatar URL LinkedinURL *string `yaml:"linkedin"` WebsiteURL *string `yaml:"website"` SupportEmail *string `yaml:"support_email"` @@ -510,13 +510,12 @@ func validateRelativeUrls( if con.AvatarUrl == nil { continue } - isRelativeUrl := strings.HasPrefix(*con.AvatarUrl, ".") || - strings.HasPrefix(*con.AvatarUrl, "/") - if !isRelativeUrl { + if isRelativeUrl := strings.HasPrefix(*con.AvatarUrl, ".") || + strings.HasPrefix(*con.AvatarUrl, "/"); !isRelativeUrl { continue } - fmt.Println(con.GithubUsername, con.AvatarUrl) + fmt.Println(con.GithubUsername, con.FilePath, con.AvatarUrl) } if len(problems) == 0 {