Skip to content

Commit

Permalink
refactor: update repl template
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Nov 26, 2020
1 parent 8a92fd7 commit 39ac73a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
34 changes: 17 additions & 17 deletions 4_generator/template_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,52 @@ const FULL_TEMPLATE = `# {{ .Version }}
{{- define "body" -}}
{{range . -}}
- {{if .Field.Header.Scope }}**{{ unescape .Field.Header.Scope }}**: {{ end }}{{ unescape .Field.Header.Subject }}({{.Short}}) (thanks @{{ unescape .Author.Name }}){{if .Field.Footer }} {{if .Field.Footer.Closes }}, Closes: {{ stringsJoin .Field.Footer.Closes "," }} {{- end }} {{- end}}
- {{if .Field.Header.Scope }}**{{ unescape .Field.Header.Scope }}**: {{ end }}{{ unescape .Field.Header.Subject }}({{ hashURL .Hash}}) (thanks @{{ unescape .Author.Name }}){{if .Field.Footer }} {{if .Field.Footer.Closes }}, Closes: {{ stringsJoin .Field.Footer.Closes "," }} {{- end }} {{- end}}
{{ end }}
{{- end -}}
{{if .Feat}}
### New feature:
### πŸ”₯ New feature:
{{ template "body" .Feat }}
{{- end -}}
{{ end }}
{{if .Fix}}
### Bugs fixed:
### πŸ› Bugs fixed:
{{ template "body" .Fix }}
{{- end -}}
{{ end }}
{{if .Refactor}}
### Code Refactoring:
### πŸ”¨ Code Refactoring:
{{ template "body" .Refactor }}
{{- end -}}
{{if .Test}}
### Testing:
### πŸ§ͺ Testing:
{{ template "body" .Test }}
{{- end -}}
{{if .Perf}}
### Performance improves:
### ⚑️ Performance improves:
{{ template "body" .Perf }}
{{- end -}}
{{ end }}
{{if .Build}}
### Build system:
### πŸ—οΈ Build system:
{{ template "body" .Build }}
{{- end -}}
{{if .Ci}}
### CI:
### πŸš— CI:
{{ template "body" .Ci }}
{{- end -}}
{{if .Chore}}
### Chore:
### πŸ’‘ Chore:
{{ template "body" .Chore }}
{{- end -}}
{{if .Docs}}
### Documentation:
### πŸ“š Documentation:
{{ template "body" .Docs }}
{{- end -}}
Expand All @@ -61,14 +61,14 @@ const FULL_TEMPLATE = `# {{ .Version }}
{{ end }}
{{if .BreakingChanges}}
### BREAKING CHANGES:
### ❀️ BREAKING CHANGES:
{{ range .BreakingChanges -}}
- {{if .Field.Footer.BreakingChange.Title}}{{ unescape .Field.Footer.BreakingChange.Title }}{{ else }}{{ unescape .Field.Title }}{{ end }}
{{ unescape .Field.Footer.BreakingChange.Content }}
{{- end -}}
{{- end}}
{{ end }}
### Commits({{ len .Commits }}):
### πŸ’ͺ Commits({{ len .Commits }}):
{{range .Commits -}}
- **{{ .Short }}** {{ unescape .Field.Title }}
- {{ hashURL .Hash}} - {{ unescape .Field.Title }}
{{ end }}`
34 changes: 17 additions & 17 deletions repl/src/template/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,52 @@ const TEMPLATE_DEFAULT = `# {{ .Version }}
{{- define "body" -}}
{{range . -}}
- {{if .Field.Header.Scope }}**{{ unescape .Field.Header.Scope }}**: {{ end }}{{ unescape .Field.Header.Subject }}({{.Short}}) (thanks @{{ unescape .Author.Name }}){{if .Field.Footer }} {{if .Field.Footer.Closes }}, Closes: {{ stringsJoin .Field.Footer.Closes "," }} {{- end }} {{- end}}
- {{if .Field.Header.Scope }}**{{ unescape .Field.Header.Scope }}**: {{ end }}{{ unescape .Field.Header.Subject }}({{ hashURL .Hash}}) (thanks @{{ unescape .Author.Name }}){{if .Field.Footer }} {{if .Field.Footer.Closes }}, Closes: {{ stringsJoin .Field.Footer.Closes "," }} {{- end }} {{- end}}
{{ end }}
{{- end -}}
{{if .Feat}}
### New feature:
### πŸ”₯ New feature:
{{ template "body" .Feat }}
{{- end -}}
{{ end }}
{{if .Fix}}
### Bugs fixed:
### πŸ› Bugs fixed:
{{ template "body" .Fix }}
{{- end -}}
{{ end }}
{{if .Refactor}}
### Code Refactoring:
### πŸ”¨ Code Refactoring:
{{ template "body" .Refactor }}
{{- end -}}
{{if .Test}}
### Testing:
### πŸ§ͺ Testing:
{{ template "body" .Test }}
{{- end -}}
{{if .Perf}}
### Performance improves:
### ⚑️ Performance improves:
{{ template "body" .Perf }}
{{- end -}}
{{ end }}
{{if .Build}}
### Build system:
### πŸ—οΈ Build system:
{{ template "body" .Build }}
{{- end -}}
{{if .Ci}}
### CI:
### πŸš— CI:
{{ template "body" .Ci }}
{{- end -}}
{{if .Chore}}
### Chore:
### πŸ’‘ Chore:
{{ template "body" .Chore }}
{{- end -}}
{{if .Docs}}
### Documentation:
### πŸ“š Documentation:
{{ template "body" .Docs }}
{{- end -}}
Expand All @@ -59,16 +59,16 @@ const TEMPLATE_DEFAULT = `# {{ .Version }}
{{ end }}
{{if .BreakingChanges}}
### BREAKING CHANGES:
### ❀️ BREAKING CHANGES:
{{ range .BreakingChanges -}}
- {{if .Field.Footer.BreakingChange.Title}}{{ unescape .Field.Footer.BreakingChange.Title }}{{ else }}{{ unescape .Field.Title }}{{ end }}
{{ unescape .Field.Footer.BreakingChange.Content }}
{{- end -}}
{{- end}}
{{ end }}
### Commits({{ len .Commits }}):
### πŸ’ͺ Commits({{ len .Commits }}):
{{range .Commits -}}
- **{{ .Short }}** {{ unescape .Field.Title }}
- {{ hashURL .Hash}} - {{ unescape .Field.Title }}
{{ end }}
`;

Expand Down

0 comments on commit 39ac73a

Please sign in to comment.