From b7a1ad08339ed42879b8af81a7545d4b1d77f4bb Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Sat, 21 Sep 2024 21:12:06 -0400 Subject: [PATCH] fix: typo --- pkg/healthcheck/commit.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/healthcheck/commit.go b/pkg/healthcheck/commit.go index a9abe76..375046e 100644 --- a/pkg/healthcheck/commit.go +++ b/pkg/healthcheck/commit.go @@ -14,12 +14,12 @@ import ( // Otherwise, it iterates over each character in the message and checks if it is a non-ASCII character. // If a non-ASCII character is found, it returns an error indicating not to use non-ASCII characters in commit messages. // Otherwise, it returns nil indicating that the commit message is valid. +// It skips the non-ASCII characters check for lines starting with specific keywords like "Co-authored-by", "Reviewed-by", and "Co-committed-by". func NonAsciiMsg(root string) error { - // cmd := exec.Command("git", "log", "--encoding=UTF-8", "--format=%B") repo, err := git.PlainOpen(root) if err != nil { - slog.Error("openning git repo", "err", err) - return fmt.Errorf("error openning git repo: %v", err) + slog.Error("opening git repo", "err", err) + return fmt.Errorf("error opening git repo: %v", err) } ref, err := repo.Head()