mirror of
https://github.com/coder/registry.git
synced 2026-06-02 20:48:14 +00:00
refactor: reorganize scripts again
This commit is contained in:
@@ -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=
|
||||
|
||||
+4
-5
@@ -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 {
|
||||
Reference in New Issue
Block a user