fix: make logging better

This commit is contained in:
Michael Smith 2025-04-08 17:29:34 +00:00
parent da735dafd6
commit b19132140a

View File

@ -50,6 +50,17 @@ const (
profileStatusOfficial profileStatusOfficial
) )
func (status contributorProfileStatus) String() string {
switch status {
case profileStatusOfficial:
return "official"
case profileStatusPartner:
return "partner"
default:
return "community"
}
}
type contributorProfile struct { type contributorProfile struct {
EmployeeGithubUsernames []string EmployeeGithubUsernames []string
GithubUsername string GithubUsername string
@ -186,7 +197,7 @@ func validateContributorYaml(yml contributorFrontmatterWithFilepath) []error {
errors = append( errors = append(
errors, errors,
fmt.Errorf( fmt.Errorf(
"%q (%q) is missing display name", "GitHub user %q (%q) is missing display name",
yml.GithubUsername, yml.GithubUsername,
yml.FilePath, yml.FilePath,
), ),
@ -326,6 +337,7 @@ func remapContributorProfile(
Bio: frontmatter.Bio, Bio: frontmatter.Bio,
LinkedinURL: frontmatter.LinkedinURL, LinkedinURL: frontmatter.LinkedinURL,
SupportEmail: frontmatter.SupportEmail, SupportEmail: frontmatter.SupportEmail,
WebsiteURL: frontmatter.WebsiteURL,
} }
if frontmatter.AvatarUrl != nil { if frontmatter.AvatarUrl != nil {
@ -503,7 +515,7 @@ func backfillAvatarUrls(contributors map[string]contributorProfile) (int, int, e
} }
successfulBackfills++ successfulBackfills++
con.AvatarUrl = url con.AvatarUrl = url + "Not implemented yet"
contributors[ghUsername] = con contributors[ghUsername] = con
}() }()
} }