feat(healthcheck): better check commit author email message
All checks were successful
submodules sync / sync (push) Successful in 1m5s
build / build (push) Successful in 2m12s
build / trigger-build-image (push) Successful in 21s

This commit is contained in:
张泊明518370910136 2025-06-04 06:29:58 -04:00
parent 9e8bbc5cc1
commit 47ef28516b
GPG Key ID: D47306D7062CDA9D

View File

@ -100,9 +100,15 @@ func AuthorEmailCheck(root string, allowedDomains []string) error {
return nil return nil
} }
} }
return fmt.Errorf( return fmt.Errorf("Author email %s is not in the allowed domains: `%s`\n\n"+
"Author email %s is not in the allowed domains: %v", "To fix it, please run the following commands:\n"+
"```bash\n"+
"git config user.email \"<your_email>\"\n"+
"git commit --amend --no-edit --reset-author\n"+
"git push --force\n"+
"```\n"+
"Replace `<your_email>` with your actual email address\n",
email, email,
allowedDomains, strings.Join(allowedDomains, "`, `"),
) )
} }