|
| 1 | +changesDir: .changes |
| 2 | +unreleasedDir: unreleased |
| 3 | +headerPath: header.tpl.md |
| 4 | +versionHeaderPath: "" |
| 5 | +changelogPath: CHANGELOG.md |
| 6 | +versionExt: md |
| 7 | +envPrefix: "CHANGIE_" |
| 8 | +versionFormat: '## deltastream-sdk {{.Version}} - {{.Time.Format "January 02, 2006"}}' |
| 9 | +kindFormat: '### {{.Kind}}' |
| 10 | +changeFormat: |- |
| 11 | + {{- $IssueList := list }} |
| 12 | + {{- if $.Custom.Issue }} |
| 13 | + {{- $changes := splitList " " (printf "%s" $.Custom.Issue) }} |
| 14 | + {{- if ne (len $changes) 0 }} |
| 15 | + {{- range $issueNbr := $changes }} |
| 16 | + {{- $changeLink := "[#nbr](https://github.com/deltastreaminc/deltastream-sdk-python/issues/nbr)" | replace "nbr" $issueNbr }} |
| 17 | + {{- $IssueList = append $IssueList $changeLink }} |
| 18 | + {{- end }} |
| 19 | + - {{.Body}} ({{ range $index, $element := $IssueList }}{{if $index}}, {{end}}{{$element}}{{end}}) |
| 20 | + {{- else }} |
| 21 | + - {{.Body}} |
| 22 | + {{- end }} |
| 23 | + {{- else }} |
| 24 | + - {{.Body}} |
| 25 | + {{- end }} |
| 26 | +
|
| 27 | +kinds: |
| 28 | + - label: Breaking Changes |
| 29 | + auto: major |
| 30 | + - label: Features |
| 31 | + auto: minor |
| 32 | + - label: Fixes |
| 33 | + auto: patch |
| 34 | + - label: Docs |
| 35 | + auto: patch |
| 36 | + - label: Under the Hood |
| 37 | + auto: patch |
| 38 | + - label: Dependencies |
| 39 | + auto: patch |
| 40 | + - label: Security |
| 41 | + auto: patch |
| 42 | + - label: Removed |
| 43 | + auto: major |
| 44 | + |
| 45 | +newlines: |
| 46 | + afterChangelogHeader: 1 |
| 47 | + afterKind: 1 |
| 48 | + afterChangelogVersion: 1 |
| 49 | + beforeKind: 1 |
| 50 | + endOfVersion: 1 |
| 51 | + |
| 52 | +custom: |
| 53 | +- key: Author |
| 54 | + label: GitHub Username(s) (separated by a single space if multiple) |
| 55 | + type: string |
| 56 | + minLength: 3 |
| 57 | +- key: Issue |
| 58 | + label: GitHub Issue Number (optional, separated by a single space if multiple) |
| 59 | + type: string |
| 60 | + minLength: 0 |
| 61 | + |
| 62 | +footerFormat: | |
| 63 | + {{- $contributorDict := dict }} |
| 64 | + {{- /* ensure we always skip snyk and dependabot in addition to the core team */}} |
| 65 | + {{- $maintainers := list "dependabot[bot]" "snyk-bot"}} |
| 66 | + {{- range $change := .Changes }} |
| 67 | + {{- $authorList := splitList " " (printf "%s" $change.Custom.Author) }} |
| 68 | + {{- /* loop through all authors for a single changelog */}} |
| 69 | + {{- range $author := $authorList }} |
| 70 | + {{- $authorLower := lower $author }} |
| 71 | + {{- /* we only want to include non-core team contributors */}} |
| 72 | + {{- if not (has $authorLower $maintainers)}} |
| 73 | + {{- $IssueList := list }} |
| 74 | + {{- if $change.Custom.Issue }} |
| 75 | + {{- $changes := splitList " " (printf "%s" $change.Custom.Issue) }} |
| 76 | + {{- if ne (len $changes) 0 }} |
| 77 | + {{- range $issueNbr := $changes }} |
| 78 | + {{- $changeLink := "[#nbr](https://github.com/deltastreaminc/deltastream-sdk-python/issues/nbr)" | replace "nbr" $issueNbr }} |
| 79 | + {{- $IssueList = append $IssueList $changeLink }} |
| 80 | + {{- end }} |
| 81 | + {{- end }} |
| 82 | + {{- end }} |
| 83 | + {{- /* check if this contributor has other changes associated with them already */}} |
| 84 | + {{- if hasKey $contributorDict $author }} |
| 85 | + {{- $contributionList := get $contributorDict $author }} |
| 86 | + {{- $contributionList = concat $contributionList $IssueList }} |
| 87 | + {{- $contributorDict = set $contributorDict $author $contributionList }} |
| 88 | + {{- else }} |
| 89 | + {{- $contributionList := $IssueList }} |
| 90 | + {{- $contributorDict = set $contributorDict $author $contributionList }} |
| 91 | + {{- end }} |
| 92 | + {{- end }} |
| 93 | + {{- end }} |
| 94 | + {{- end }} |
| 95 | + {{- /* no indentation here for formatting so the final markdown doesn't have unneeded indentations */}} |
| 96 | + {{- if $contributorDict}} |
| 97 | + ### Contributors |
| 98 | + {{- range $k,$v := $contributorDict }} |
| 99 | + - [@{{$k}}](https://github.com/{{$k}}){{ if $v }} ({{ range $index, $element := $v }}{{if $index}}, {{end}}{{$element}}{{end}}){{ end }} |
| 100 | + {{- end }} |
| 101 | + {{- end }} |
0 commit comments