|
| 1 | +# Mainly from https://github.com/dbt-labs/dbt-core/blob/main/.changie.yaml |
| 2 | + |
| 3 | +changesDir: .changes |
| 4 | +unreleasedDir: unreleased |
| 5 | +headerPath: header.tpl.md |
| 6 | +changelogPath: CHANGELOG.md |
| 7 | +versionExt: md |
| 8 | +versionFormat: '## dbt-snowflake-query-tags {{.Version}} - {{.Time.Format "January 02, 2006"}}' |
| 9 | +kindFormat: '### {{.Kind}}' |
| 10 | +changeFormat: '- {{.Body}} ([#{{.Custom.PR}}](https://github.com/get-select/dbt-snowflake-query-tags/pull/{{.Custom.PR}}))' |
| 11 | +kinds: |
| 12 | +- label: Breaking Changes |
| 13 | +- label: Features |
| 14 | +- label: Fixes |
| 15 | +- label: Docs |
| 16 | +newlines: |
| 17 | + afterChangelogHeader: 1 |
| 18 | + afterKind: 1 |
| 19 | + afterChangelogVersion: 1 |
| 20 | + beforeKind: 1 |
| 21 | + endOfVersion: 1 |
| 22 | +custom: |
| 23 | +- key: Author |
| 24 | + label: GitHub Username(s) (separated by a single space if multiple) |
| 25 | + type: string |
| 26 | + minLength: 3 |
| 27 | +- key: PR |
| 28 | + label: GitHub Pull Request Number |
| 29 | + type: int |
| 30 | + minInt: 1 |
| 31 | + |
| 32 | +footerFormat: | |
| 33 | + {{- $contributorDict := dict }} |
| 34 | + {{- /* any names added to this list should be all lowercase for later matching purposes */}} |
| 35 | + {{- $core_team := list "niallrees" "ian-whitestone" }} |
| 36 | + {{- range $change := .Changes }} |
| 37 | + {{- $authorList := splitList " " $change.Custom.Author }} |
| 38 | + {{- /* loop through all authors for a PR */}} |
| 39 | + {{- range $author := $authorList }} |
| 40 | + {{- $authorLower := lower $author }} |
| 41 | + {{- /* we only want to include non-core team contributors */}} |
| 42 | + {{- if not (has $authorLower $core_team)}} |
| 43 | + {{- /* Docs kind link back to dbt-docs instead of dbt-core PRs */}} |
| 44 | + {{- $prLink := $change.Kind }} |
| 45 | + {{- /* check if this contributor has other PRs associated with them already */}} |
| 46 | + {{- if hasKey $contributorDict $author }} |
| 47 | + {{- $prList := get $contributorDict $author }} |
| 48 | + {{- $prList = append $prList $prLink }} |
| 49 | + {{- $contributorDict := set $contributorDict $author $prList }} |
| 50 | + {{- else }} |
| 51 | + {{- $prList := list $prLink }} |
| 52 | + {{- $contributorDict := set $contributorDict $author $prList }} |
| 53 | + {{- end }} |
| 54 | + {{- end}} |
| 55 | + {{- end}} |
| 56 | + {{- end }} |
| 57 | + {{- /* no indentation here for formatting so the final markdown doesn't have unneeded indentations */}} |
| 58 | + {{- if $contributorDict}} |
| 59 | + ### Contributors |
| 60 | + {{- range $k,$v := $contributorDict }} |
| 61 | + - [@{{$k}}](https://github.com/{{$k}}) ({{ range $index, $element := $v }}{{if $index}}, {{end}}{{$element}}{{end}}) |
| 62 | + {{- end }} |
| 63 | + {{- end }} |
0 commit comments