Skip to content

Commit d0c3657

Browse files
authored
chore: add changelog howto in CONTRIBUTING (#681)
1 parent 4cdb41a commit d0c3657

File tree

2 files changed

+41
-5
lines changed

2 files changed

+41
-5
lines changed

.github/workflows/changelog-verification.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ jobs:
1919
if: ${{ failure() }}
2020
run: |
2121
echo "::error ::No new/updated changelog entry found in /.changes directory. Please either:"
22-
echo "::error ::* Add a changelog entry (in most cases) –or–"
22+
echo "::error ::* Add a changelog entry (see CONTRIBUTING.md for instructions) –or–"
2323
echo "::error ::* Add the 'no-changelog' label to this PR (in rare cases not warranting a changelog entry)"
2424
exit 1

CONTRIBUTING.md

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,50 @@ To send us a pull request, please:
3232

3333
1. Fork the repository.
3434
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
35-
3. Ensure local tests pass.
36-
4. Commit to your fork using clear commit messages.
37-
5. Send us a pull request, answering any default questions in the pull request interface.
38-
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
35+
* Ensure your modifications are accompanied by a [changelog entry](#Changelog) where necessary.
36+
4. Ensure local tests pass.
37+
5. Commit to your fork using clear commit messages.
38+
6. Send us a pull request, answering any default questions in the pull request interface.
39+
7. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
3940

4041
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
4142
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
4243

44+
### Changelog
45+
Merges to this repository must include one or more changelog entries which describe the modifications made.
46+
47+
Entries are placed in the top-level `.changes/` directory. An entry is a file containing a JSON object with the
48+
following fields:
49+
50+
| Field name | Type | Required | Enum | Description |
51+
|---------------|------------|----------|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
52+
| `id` | `string` | yes | | A unique identifier for this entry. We recommend you generate a UUID for this field. |
53+
| `type` | `string` | yes | `bugfix`, `feature`, `documentation`, `misc` | The type of change being made. |
54+
| `description` | `string` | yes | | A description of the change being made. |
55+
| `issues` | `string[]` | no | | A list of references to any related issues in the relevant repositories. A reference can be specified in several ways:<ul><li>The issue number, if local to this repository (eg. `#12345`)</li><li>A fully-qualified issue ID (eg.`awslabs/aws-sdk-kotlin#12345`)</li><li>A fully-qualified URL (eg. `https://issuetracker.com/12345`)</li></ul> |
56+
| `module` | `string` | no | | The area of the code affected by your changes. If unsure, leave this value unset. |
57+
58+
The filename of an entry is arbitrary. We recommend `<id>.json`, where `<id>` corresponds to the `id` field of the entry
59+
itself.
60+
61+
Entries in the `.changes/` directory are automatically rolled into the main `CHANGELOG.md` file in every release.
62+
63+
If you believe that your modifications do not warrant a changelog entry, you can add the `no-changelog` label to your
64+
pull request. The label will suppress the CI that blocks merging in the absence of a changelog, though the reviewer(s)
65+
of your request may disagree and ask that you add one anyway.
66+
67+
#### Example
68+
```json
69+
{
70+
"id": "263ea6ab-4b75-41a8-9c37-821c30d7b9e5",
71+
"type": "feature",
72+
"description": "Add multiplatform support for URL parsing.",
73+
"issues": [
74+
"awslabs/smithy-kotlin#12345"
75+
]
76+
}
77+
```
78+
4379

4480
When submitting a pull request please have your commits follow these guidelines:
4581

0 commit comments

Comments
 (0)