diff --git a/cmd/generate/config/output.go b/cmd/generate/config/output.go index 2743b5a..5e7d254 100644 --- a/cmd/generate/config/output.go +++ b/cmd/generate/config/output.go @@ -15,6 +15,13 @@ func generateOutputFile(outputPath string, attributionMap map[string][]string) e } defer file.Close() + // write the header preamble + _, err = file.WriteString("# Configuration for attributing commits with emails to GitHub user profiles\n# Used during codeowners generation.\n\n# List the emails associated with the given username\n# The commits associated with these emails will be attributed to\n# the username in this yaml map. Any number of emails may be listed\n\n") + + if err != nil { + return fmt.Errorf("error writing to %s file: %w", outputPath, err) + } + var config config.Spec config.Attributions = attributionMap