Skip to content

Commit

Permalink
chore: Minor documentation refactoring on the new changelog process. (#…
Browse files Browse the repository at this point in the history
…2162)

* chore: Minor documentation refactoring on the new changelog process.

* minor fix.

* fix headline.

* temp change to be reverted.

* reverts previous change.

* Update tools/check-changelog-entry-file/main.go
  • Loading branch information
marcosuma authored Apr 18, 2024
1 parent 78c807d commit 0945f29
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions contributing/changelog-process.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Changelog Process

- [Script for creating changelog entry files](#script-for-creating-changelog-entry-files)
- [Changelog format](#changelog-format)
- [Changelog entry guidelines](#changelog-entry-guidelines)
- [Script for creating changelog entry files](#script-for-creating-changelog-entry-files)
- [PR Changelog check](#pr-changelog-check)
- [Unreleased section of CHANGELOG.md automatic update](#unreleased-section-of-CHANGELOG.md-automatic-update)

Expand All @@ -12,6 +12,16 @@ We use the [go-changelog](https://github.com/hashicorp/go-changelog) to generate

`@mongodb/docs-cloud-team` will be required reviewers for new changelog entry files contained in a Pull Request. We will wait up to 24 hours for a review, and after that proceed with the merge. Exceptions for merging ahead of the 24 hours may also apply.

## Script for creating changelog entry files

A script is defined to guide the creation of new entry files, simplifying the process and avoiding errors. You can invoke the script using the following make command:

```
make generate-changelog-entry
```

- The `subcategory` input prompt refers to the prefix of the changelog entry, used for specifying the relevant resource/data source when needed (e.g. data-source/mongodbatlas_project)

## Changelog format

The changelog format requires an entry in the following format, where HEADER corresponds to the changelog category, and the entry is the changelog entry itself. The entry should be included in a file in the `.changelog` directory with the naming convention `{PR-NUMBER}.txt`. For example, to create a changelog entry for pull request 1234, there should be a file named `.changelog/1234.txt`.
Expand Down Expand Up @@ -136,16 +146,6 @@ data-source/mongodbatlas_search_indexes: Removes `page_num` and `items_per_page`
- Code refactoring
- Dependency updates

## Script for creating changelog entry files

A script is defined to guide the creation of new entry files, simplifying the process and avoiding errors. You can invoke the script using the following make command:

```
make generate-changelog-entry
```

- The `subcategory` input prompt refers to the prefix of the changelog entry, used for specifying the relevant resource/data source when needed (e.g. data-source/mongodbatlas_project)

## PR Changelog check

A PR check is included to validate the changelog entry file.
Expand Down
2 changes: 1 addition & 1 deletion tools/check-changelog-entry-file/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func main() {
return
}

log.Fatalf("Consider using label %s if this PR doesn't need a changelog entry file. Read contributing guides for more info.\nChangelog file not found: %s, err: %v", skipLabelName, filePath, errFile)
log.Fatalf("Have you ran the `make generate-changelog-entry` command?\nIf this PR doesn't need a changelog entry file, consider using label %s.\nRead contributing guides (https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/contributing/changelog-process.md) for more info.\nChangelog entry file %s not found due to the following reason: %v.", skipLabelName, filePath, errFile)
}

func validateChangelog(filePath, body string) {
Expand Down

0 comments on commit 0945f29

Please sign in to comment.