-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy path.changie.yaml
More file actions
97 lines (90 loc) · 3.41 KB
/
Copy path.changie.yaml
File metadata and controls
97 lines (90 loc) · 3.41 KB
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
changesDir: .changes
unreleasedDir: unreleased
headerPath: header.tpl.md
versionHeaderPath: ""
changelogPath: CHANGELOG.md
versionExt: md
envPrefix: "CHANGIE_"
versionFormat: |-
## {{.Version}}
Released {{.Time.Format "January 02, 2006"}}
kindFormat: "### {{.Kind}}"
custom:
- key: issue
label: "[Optional] dbt-core issue number (separated by a single space if multiple)"
type: string
required: false
- key: author
label: "[Optional] Author's GitHub handle without the @ symbol (separated by a single space if multiple)"
type: string
required: false
# Change format: optional issue links only. The project field is retained in the
# change files (for the internal changelog) but not rendered here. Issue links
# are only rendered for dbt-core changes and only when an issue number is present.
changeFormat: |-
{{- $IssueList := list }}
{{- if eq $.Custom.project "dbt-core" }}
{{- range $issueNbr := splitList " " $.Custom.issue }}
{{- if $issueNbr }}
{{- $changeLink := "[#nbr](https://github.com/dbt-labs/dbt-core/issues/nbr)" | replace "nbr" $issueNbr }}
{{- $IssueList = append $IssueList $changeLink }}
{{- end -}}
{{- end -}}
{{- end -}}
- {{.Body}}{{if $IssueList}} ({{ range $index, $element := $IssueList }}{{if $index}}, {{end}}{{$element}}{{end}}){{end}}
kinds:
- label: Breaking Changes
- label: Features
- label: Fixes
- label: Under the Hood
- label: Dependencies
- label: Security
# these changelogs are always for dbt-core
post:
- key: project
value: dbt-core
newlines:
afterChangelogHeader: 1
afterKind: 1
afterChangelogVersion: 1
beforeKind: 1
endOfVersion: 1
# Contributors section (mirrors fs). Set FUSION_TEAM (space-separated handles)
# to exclude maintainers; otherwise all non-bot authors are listed. Issue links
# resolve to the dbt-core repo, matching changeFormat above.
footerFormat: |
{{- $contributorDict := dict }}
{{- $fusion_team_env := default "" .Env.FUSION_TEAM }}
{{- $fusion_team := splitList " " $fusion_team_env }}
{{- $maintainers := list "dependabot[bot]"}}
{{- range $team_member := $fusion_team }}
{{- $maintainers = append $maintainers (lower $team_member) }}
{{- end }}
{{- range $change := .Changes }}
{{- $authorList := splitList " " $change.Custom.author }}
{{- range $author := $authorList }}
{{- if and $author (not (has (lower $author) $maintainers)) }}
{{- $IssueList := list }}
{{- if eq $change.Custom.project "dbt-core" }}
{{- range $issueNbr := splitList " " $change.Custom.issue }}
{{- if $issueNbr }}
{{- $changeLink := "[#nbr](https://github.com/dbt-labs/dbt-core/issues/nbr)" | replace "nbr" $issueNbr }}
{{- $IssueList = append $IssueList $changeLink }}
{{- end }}
{{- end }}
{{- end }}
{{- if hasKey $contributorDict $author }}
{{- $contributorDict = set $contributorDict $author (concat (get $contributorDict $author) $IssueList) }}
{{- else }}
{{- $contributorDict = set $contributorDict $author $IssueList }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if $contributorDict}}
### Contributors
{{- range $k := (keys $contributorDict | sortAlpha) }}
{{- $v := get $contributorDict $k }}
- [@{{$k}}](https://github.com/{{$k}}){{if $v}} ({{ range $index, $element := $v }}{{if $index}}, {{end}}{{$element}}{{end}}){{end}}
{{- end }}
{{- end }}