refactor: reorganize scripts again

This commit is contained in:
Michael Smith
2025-04-08 21:01:36 +00:00
parent c3f998dbd9
commit 9e48eb806f
2 changed files with 6 additions and 5 deletions
+2
View File
@@ -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=
@@ -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 {