Skip to content

Commit

Permalink
feat: add comment preamble to generated config (#214)
Browse files Browse the repository at this point in the history
* add comment preamble to generated config
  • Loading branch information
zeucapua authored Oct 11, 2024
1 parent aa7b1a4 commit deb22a2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/generate/config/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit deb22a2

Please sign in to comment.