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