Skip to content

Commit

Permalink
fix: Fixes datasource entry for changelog based on Hashicorp's change…
Browse files Browse the repository at this point in the history
…log validation
  • Loading branch information
maastha authored Apr 18, 2024
1 parent 1400b8a commit b49fb05
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions contributing/changelog-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ The CHANGELOG is intended to show operator-impacting changes to the codebase for
``````

`HEADER`
- Must be one of the following values: `breaking-change`, `new-resource`, `new-data-source`, `new-guide`, `note`, `enhancement`, `bug`. Examples for each type can be seen below.
- Must be one of the following values: `breaking-change`, `new-resource`, `new-datasource`, `new-guide`, `note`, `enhancement`, `bug`. Examples for each type can be seen below.

`ENTRY`
- In the case of feature entry types (new-resource, new-data-source, new-guide) only the name of the new resource or guide is defined in the entry.
- In the case of feature entry types (new-resource, new-datasource, new-guide) only the name of the new resource or guide is defined in the entry.
- For other entry types:
- Entry starts with the resource type, followed by its name (e.g. `resource/mongodbatlas_project: `). Use a `provider: ` prefix for provider-level changes.
- For the description use a third person point of view, [active voice](https://www.mongodb.com/docs/meta/style-guide/writing/use-active-voice/#std-label-use-active-voice), and start with an uppercase character.
Expand All @@ -81,10 +81,10 @@ mongodbatlas_stream_connection

#### New data source

A new data source entry should only contain the name of the data source, and use the `release-note:new-data-source` header.
A new data source entry should only contain the name of the data source, and use the `release-note:new-datasource` header.

``````markdown
```release-note:new-data-source
```release-note:new-datasource
mongodbatlas_stream_connection
```
``````
Expand Down
2 changes: 1 addition & 1 deletion scripts/changelog/allowed-types.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
breaking-change
new-resource
new-data-source
new-datasource
new-guide
note
enhancement
Expand Down
2 changes: 1 addition & 1 deletion scripts/changelog/changelog.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ NOTES:
{{ end -}}
{{- end -}}

{{- $features := combineTypes .NotesByType.feature (index .NotesByType "new-resource" ) (index .NotesByType "new-data-source") (index .NotesByType "new-guide") }}
{{- $features := combineTypes .NotesByType.feature (index .NotesByType "new-resource" ) (index .NotesByType "new-datasource") (index .NotesByType "new-guide") }}
{{- if $features }}
FEATURES:

Expand Down
2 changes: 1 addition & 1 deletion scripts/changelog/release-note.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- define "note" -}}
{{- if eq "new-resource" .Type -}}
* **New Resource:** `{{.Body}}` ([#{{- .Issue -}}](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/{{- .Issue -}}))
{{- else if eq "new-data-source" .Type -}}
{{- else if eq "new-datasource" .Type -}}
* **New Data Source:** `{{.Body}}` ([#{{- .Issue -}}](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/{{- .Issue -}}))
{{- else if eq "new-guide" .Type -}}
* **New Guide:** `{{.Body}}` ([#{{- .Issue -}}](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/{{- .Issue -}}))
Expand Down

0 comments on commit b49fb05

Please sign in to comment.