0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-13 21:30:40 +00:00

fix: trim spaces from release notes template

This commit is contained in:
Beatriz Vieira 2020-02-01 23:05:39 -03:00
parent f4d1499331
commit fef044c99d

View File

@ -14,19 +14,27 @@ type releaseNoteTemplateVariables struct {
}
const rnTemplate = `## v{{.Version}} ({{.Date}})
{{- if .Sections.feat}}
{{if .Sections.feat}}### {{.Sections.feat.Name}}
### {{.Sections.feat.Name}}
{{range $k,$v := .Sections.feat.Items}}
- {{if $v.Scope}}**{{$v.Scope}}:** {{end}}{{$v.Subject}} ({{$v.Hash}}) {{if $v.Metadata.issueid}}({{$v.Metadata.issueid}}){{end}}{{end}}{{end}}
- {{if $v.Scope}}**{{$v.Scope}}:** {{end}}{{$v.Subject}} ({{$v.Hash}}){{if $v.Metadata.issueid}} ({{$v.Metadata.issueid}}){{end}}{{end}}
{{- end}}
{{if .Sections.fix}}### {{.Sections.fix.Name}}
{{- if .Sections.fix}}
### {{.Sections.fix.Name}}
{{range $k,$v := .Sections.fix.Items}}
- {{if $v.Scope}}**{{$v.Scope}}:** {{end}}{{$v.Subject}} ({{$v.Hash}}) {{if $v.Metadata.issueid}}({{$v.Metadata.issueid}}){{end}}{{end}}{{end}}
- {{if $v.Scope}}**{{$v.Scope}}:** {{end}}{{$v.Subject}} ({{$v.Hash}}){{if $v.Metadata.issueid}} ({{$v.Metadata.issueid}}){{end}}{{end}}
{{- end}}
{{if .BreakingChanges}}### Breaking Changes
{{- if .BreakingChanges}}
### Breaking Changes
{{range $k,$v := .BreakingChanges}}
- {{$v}}{{end}}
{{end}}`
{{- end}}
`
// OutputFormatter output formatter interface.
type OutputFormatter interface {