refactor: reorganize scripts again
This commit is contained in:
parent
c3f998dbd9
commit
9e48eb806f
2
go.sum
2
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 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
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"`
|
DisplayName string `yaml:"display_name"`
|
||||||
Bio string `yaml:"bio"`
|
Bio string `yaml:"bio"`
|
||||||
GithubUsername string `yaml:"github"`
|
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"`
|
LinkedinURL *string `yaml:"linkedin"`
|
||||||
WebsiteURL *string `yaml:"website"`
|
WebsiteURL *string `yaml:"website"`
|
||||||
SupportEmail *string `yaml:"support_email"`
|
SupportEmail *string `yaml:"support_email"`
|
||||||
@ -510,13 +510,12 @@ func validateRelativeUrls(
|
|||||||
if con.AvatarUrl == nil {
|
if con.AvatarUrl == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
isRelativeUrl := strings.HasPrefix(*con.AvatarUrl, ".") ||
|
if isRelativeUrl := strings.HasPrefix(*con.AvatarUrl, ".") ||
|
||||||
strings.HasPrefix(*con.AvatarUrl, "/")
|
strings.HasPrefix(*con.AvatarUrl, "/"); !isRelativeUrl {
|
||||||
if !isRelativeUrl {
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println(con.GithubUsername, con.AvatarUrl)
|
fmt.Println(con.GithubUsername, con.FilePath, con.AvatarUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(problems) == 0 {
|
if len(problems) == 0 {
|
||||||
Loading…
x
Reference in New Issue
Block a user