feat(healthcheck): better check commit author email message
This commit is contained in:
		
							parent
							
								
									9e8bbc5cc1
								
							
						
					
					
						commit
						47ef28516b
					
				|  | @ -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, "`, `"), | ||||||
| 	) | 	) | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user