0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-24 11:10:39 +00:00

refactor: overwrite release notes header at config merge

This commit is contained in:
Beatriz Vieira 2021-02-15 01:03:57 -03:00
parent 2ae35c91af
commit 253b77d061

View File

@ -42,6 +42,9 @@ func main() {
if merr := mergo.Merge(&cfg, repoCfg, mergo.WithOverride); merr != nil { if merr := mergo.Merge(&cfg, repoCfg, mergo.WithOverride); merr != nil {
log.Fatal(merr) log.Fatal(merr)
} }
if len(repoCfg.ReleaseNotes.Headers) > 0 { // mergo is merging maps, headers will be overwritten
cfg.ReleaseNotes.Headers = repoCfg.ReleaseNotes.Headers
}
} }
messageProcessor := sv.NewMessageProcessor(cfg.CommitMessage, cfg.Branches) messageProcessor := sv.NewMessageProcessor(cfg.CommitMessage, cfg.Branches)