Skip to content

Commit

Permalink
link changelog to dbt-docs for Docs kind (dbt-labs#5628)
Browse files Browse the repository at this point in the history
* first pass

* tweaks

* convert to use dbt-docs links in contributors section

* fix eq check

* fix format of contributos prs

* update docs changelog to point back to dbt-docs

* update beta 1.3 docs changelog

* remove optional param

* make issue inclusion conditional on being filled
  • Loading branch information
emmyoop authored and Axel Goblet committed Sep 16, 2022
1 parent ec2e582 commit d2cc705
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .changes/1.3.0/Docs-20220728-140258.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ body: Update dependency inline-source from ^6.1.5 to ^7.2.0
time: 2022-07-28T14:02:58.441963-07:00
custom:
Author: emmyoop
Issue: "5574"
PR: "5577"
Issue: "299"
PR: "291"
4 changes: 2 additions & 2 deletions .changes/1.3.0/Docs-20220728-140329.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ body: Update dependency jest from ^26.2.2 to ^28.1.3
time: 2022-07-28T14:03:29.837274-07:00
custom:
Author: emmyoop
Issue: "5574"
PR: "5577"
Issue: "299"
PR: "291"
4 changes: 2 additions & 2 deletions .changes/1.3.0/Docs-20220728-140351.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ body: Update dependency underscore from ^1.9.0 to ^1.13.4
time: 2022-07-28T14:03:51.123441-07:00
custom:
Author: emmyoop
Issue: "5574"
PR: "5577"
Issue: "299"
PR: "291"
4 changes: 2 additions & 2 deletions .changes/1.3.0/Docs-20220728-140425.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ body: Update dependency webpack-cli from ^3.3.12 to ^4.7.0
time: 2022-07-28T14:04:25.629638-07:00
custom:
Author: emmyoop
Issue: "5574"
PR: "5577"
Issue: "299"
PR: "291"
4 changes: 2 additions & 2 deletions .changes/1.3.0/Docs-20220728-140449.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ body: Update dependency webpack-dev-server from ^3.1.11 to ^4.9.3
time: 2022-07-28T14:04:49.637369-07:00
custom:
Author: emmyoop
Issue: "5574"
PR: "5577"
Issue: "299"
PR: "291"
4 changes: 2 additions & 2 deletions .changes/1.3.0/Docs-20220728-140620.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ body: Searches no longer require perfect matches, and instead consider each word
time: 2022-07-28T14:06:20.371364-07:00
custom:
Author: joellabes
Issue: "5574"
PR: "5577"
Issue: "143"
PR: "145"
4 changes: 2 additions & 2 deletions .changes/1.3.0/Docs-20220728-140806.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ body: Support the renaming of SQL to code happening in dbt-core
time: 2022-07-28T14:08:06.184934-07:00
custom:
Author: jtcohen6 stu-k drewbanin ChenyuLInx
Issue: "5574"
PR: "5577"
Issue: "299"
PR: "292"
4 changes: 2 additions & 2 deletions .changes/unreleased/Docs-20220804-134138.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ body: Leverages `docs.node_color` from `dbt-core` to color nodes in the DAG
time: 2022-08-04T13:41:38.669987-05:00
custom:
Author: matt-winkler sungchun12 b-per
Issue: "5613"
PR: "5614"
Issue: "44"
PR: "281"
45 changes: 32 additions & 13 deletions .changie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,26 @@ versionExt: md
versionFormat: '## dbt-core {{.Version}} - {{.Time.Format "January 02, 2006"}}'
kindFormat: '### {{.Kind}}'
changeFormat: '- {{.Body}} ([#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-core/issues/{{.Custom.Issue}}), [#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-core/pull/{{.Custom.PR}}))'

kinds:
- label: Breaking Changes
- label: Features
- label: Fixes
- label: Docs
- label: Under the Hood
- label: Dependencies
- label: Security
- label: Breaking Changes
- label: Features
- label: Fixes
- label: Docs
changeFormat: '- {{.Body}} ([dbt-docs/#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-docs/issues/{{.Custom.Issue}}), [dbt-docs/#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-docs/pull/{{.Custom.PR}}))'
- label: Under the Hood
- label: Dependencies
changeFormat: '- {{.Body}} ({{if ne .Custom.Issue ""}}[#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-core/issues/{{.Custom.Issue}}), {{end}}[#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-core/pull/{{.Custom.PR}}))'
- label: Security
changeFormat: '- {{.Body}} ({{if ne .Custom.Issue ""}}[#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-core/issues/{{.Custom.Issue}}), {{end}}[#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-core/pull/{{.Custom.PR}}))'

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)
Expand All @@ -23,11 +35,12 @@ custom:
- key: Issue
label: GitHub Issue Number
type: int
minLength: 4
minInt: 1
- key: PR
label: GitHub Pull Request Number
type: int
minLength: 4
minInt: 1

footerFormat: |
{{- $contributorDict := dict }}
{{- /* any names added to this list should be all lowercase for later matching purposes */}}
Expand All @@ -39,14 +52,20 @@ footerFormat: |
{{- $authorLower := lower $author }}
{{- /* we only want to include non-core team contributors */}}
{{- if not (has $authorLower $core_team)}}
{{- $pr := $change.Custom.PR }}
{{- /* Docs kind link back to dbt-docs instead of dbt-core PRs */}}
{{- $prLink := $change.Kind }}
{{- if eq $change.Kind "Docs" }}
{{- $prLink = "[dbt-docs/#pr](https://github.com/dbt-labs/dbt-docs/pull/pr)" | replace "pr" $change.Custom.PR }}
{{- else }}
{{- $prLink = "[#pr](https://github.com/dbt-labs/dbt-core/pull/pr)" | replace "pr" $change.Custom.PR }}
{{- end }}
{{- /* check if this contributor has other PRs associated with them already */}}
{{- if hasKey $contributorDict $author }}
{{- $prList := get $contributorDict $author }}
{{- $prList = append $prList $pr }}
{{- $prList = append $prList $prLink }}
{{- $contributorDict := set $contributorDict $author $prList }}
{{- else }}
{{- $prList := list $change.Custom.PR }}
{{- $prList := list $prLink }}
{{- $contributorDict := set $contributorDict $author $prList }}
{{- end }}
{{- end}}
Expand All @@ -56,6 +75,6 @@ footerFormat: |
{{- if $contributorDict}}
### Contributors
{{- range $k,$v := $contributorDict }}
- [@{{$k}}](https://github.com/{{$k}}) ({{ range $index, $element := $v }}{{if $index}}, {{end}}[#{{$element}}](https://github.com/dbt-labs/dbt-core/pull/{{$element}}){{end}})
- [@{{$k}}](https://github.com/{{$k}}) ({{ range $index, $element := $v }}{{if $index}}, {{end}}{{$element}}{{end}})
{{- end }}
{{- end }}

0 comments on commit d2cc705

Please sign in to comment.