Skip to content

Commit

Permalink
Fix changlogs, remove PR reference (#9887)
Browse files Browse the repository at this point in the history
* stop referencing PRs

* convert PR to Issue in older yaml
# Conflicts:
#	.changes/1.8.0/Dependencies-20231005-151848.yaml
#	.changes/1.8.0/Dependencies-20231031-131954.yaml
#	.changes/1.8.0/Dependencies-20231106-130051.yaml
#	.changes/1.8.0/Dependencies-20231122-001840.yaml
#	.changes/1.8.0/Dependencies-20231204-000945.yaml
#	.changes/1.8.0/Dependencies-20231211-005651.yaml
#	.changes/1.8.0/Dependencies-20240115-012030.yaml
#	.changes/1.8.0/Dependencies-20240123-105843.yaml
#	.changes/1.8.0/Dependencies-20240129-005734.yaml
#	.changes/1.8.0/Dependencies-20240129-005743.yaml
#	.changes/1.8.0/Dependencies-20240212-011324.yaml
#	.changes/1.8.0/Dependencies-20240222-102947.yaml
#	.changes/1.8.0/Dependencies-20240226-004412.yaml
#	.changes/1.8.0/Dependencies-20240226-123502.yaml
#	.changes/1.8.0/Dependencies-20240227-151115.yaml
#	.changes/1.8.0/Security-20240222-152445.yaml
#	.changes/unreleased/Dependencies-20240117-100818.yaml
  • Loading branch information
emmyoop committed Apr 22, 2024
1 parent 3124717 commit 13a5dd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 49 deletions.
52 changes: 4 additions & 48 deletions .changie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,43 +31,7 @@ kinds:
- {{.Body}} ({{ range $index, $element := $IssueList }}{{if $index}}, {{end}}{{$element}}{{end}})
- label: Under the Hood
- label: Dependencies
changeFormat: |-
{{- $PRList := list }}
{{- $changes := splitList " " $.Custom.PR }}
{{- range $pullrequest := $changes }}
{{- $changeLink := "[#nbr](https://github.com/dbt-labs/dbt-core/pull/nbr)" | replace "nbr" $pullrequest }}
{{- $PRList = append $PRList $changeLink }}
{{- end -}}
- {{.Body}} ({{ range $index, $element := $PRList }}{{if $index}}, {{end}}{{$element}}{{end}})
skipGlobalChoices: true
additionalChoices:
- key: Author
label: GitHub Username(s) (separated by a single space if multiple)
type: string
minLength: 3
- key: PR
label: GitHub Pull Request Number (separated by a single space if multiple)
type: string
minLength: 1
- label: Security
changeFormat: |-
{{- $PRList := list }}
{{- $changes := splitList " " $.Custom.PR }}
{{- range $pullrequest := $changes }}
{{- $changeLink := "[#nbr](https://github.com/dbt-labs/dbt-core/pull/nbr)" | replace "nbr" $pullrequest }}
{{- $PRList = append $PRList $changeLink }}
{{- end -}}
- {{.Body}} ({{ range $index, $element := $PRList }}{{if $index}}, {{end}}{{$element}}{{end}})
skipGlobalChoices: true
additionalChoices:
- key: Author
label: GitHub Username(s) (separated by a single space if multiple)
type: string
minLength: 3
- key: PR
label: GitHub Pull Request Number (separated by a single space if multiple)
type: string
minLength: 1

newlines:
afterChangelogHeader: 1
Expand Down Expand Up @@ -106,18 +70,10 @@ footerFormat: |
{{- $changeList := splitList " " $change.Custom.Author }}
{{- $IssueList := list }}
{{- $changeLink := $change.Kind }}
{{- if or (eq $change.Kind "Dependencies") (eq $change.Kind "Security") }}
{{- $changes := splitList " " $change.Custom.PR }}
{{- range $issueNbr := $changes }}
{{- $changeLink := "[#nbr](https://github.com/dbt-labs/dbt-core/pull/nbr)" | replace "nbr" $issueNbr }}
{{- $IssueList = append $IssueList $changeLink }}
{{- end -}}
{{- else }}
{{- $changes := splitList " " $change.Custom.Issue }}
{{- range $issueNbr := $changes }}
{{- $changeLink := "[#nbr](https://github.com/dbt-labs/dbt-core/issues/nbr)" | replace "nbr" $issueNbr }}
{{- $IssueList = append $IssueList $changeLink }}
{{- end -}}
{{- $changes := splitList " " $change.Custom.Issue }}
{{- range $issueNbr := $changes }}
{{- $changeLink := "[#nbr](https://github.com/dbt-labs/dbt-core/issues/nbr)" | replace "nbr" $issueNbr }}
{{- $IssueList = append $IssueList $changeLink }}
{{- end }}
{{- /* check if this contributor has other changes associated with them already */}}
{{- if hasKey $contributorDict $author }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bot-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ jobs:
commit_message: "Add automated changelog yaml from template for bot PR"
changie_kind: ${{ matrix.changie_kind }}
label: ${{ matrix.label }}
custom_changelog_string: "custom:\n Author: ${{ github.event.pull_request.user.login }}\n PR: ${{ github.event.pull_request.number }}"
custom_changelog_string: "custom:\n Author: ${{ github.event.pull_request.user.login }}\n Issue: ${{ github.event.pull_request.number }}"

0 comments on commit 13a5dd7

Please sign in to comment.