-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added JSON-based changes to auto-generate the changelog.
Solves merge conflicts between changelogs, by using sorting and type-based merging for the changelog from a series of JSON files. This allows conflict-free generation of a changelog using JSON-based changes, stored in `.changes`. Each entry can be object or array-based: the array must contain objects, where each object is a different change. The entries are added to the changelog, in sorted order, and the validity of the changelog is verified. To ensure fidelity of the changelog changes, the `no changelog` flag or at least 1 change (either removed, or added/dified and almovidated) for a JSON file under `.changes` must occur. A `pre-release-hook` has been added so all these changes are automerged into the CHANGELOG prior to release.
- Loading branch information
1 parent
77952e4
commit b89a186
Showing
15 changed files
with
1,396 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"description": "use JSON-based files to autogenerate CHANGELOG.md", | ||
"issues": [662], | ||
"type": "internal" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Changes | ||
|
||
This stores changes to automatically generate the changelog, to avoid merge conflicts. Files should be in a JSON format, with the following format: | ||
|
||
```json | ||
{ | ||
"description": "single-line description to add to the CHANGELOG.", | ||
"issues": [894], | ||
"type": "added", | ||
"breaking": false | ||
} | ||
``` | ||
|
||
Valid types are: | ||
- added (Added) | ||
- changed (Changed) | ||
- fixed (Fixed) | ||
- removed (Removed) | ||
- internal (Internal) | ||
|
||
`breaking` is optional and defaults to false. if `breaking` is present for any active changes, a `BREAKING:` notice will be added at the start of the entry. `issues` is also optional, and is currently unused, and is an array of issues fixed by the PR, and defaults to an empty array. | ||
|
||
The file numbers should be `${pr}.json`. The `pr` is optional, and if not, an issue number should be used, in the `_${issue}.json` format. We also support multiple PRs per entry, using the `${pr1}-${pr2}-(...).json` format. | ||
|
||
If multiple changes are made in a single PR, you can also pass an array of entries: | ||
|
||
```json | ||
[ | ||
{ | ||
"description": "this is one added entry.", | ||
"issues": [630], | ||
"type": "added" | ||
}, | ||
{ | ||
"description": "this is another added entry.", | ||
"issues": [642], | ||
"type": "added" | ||
}, | ||
{ | ||
"description": "this is a fixed entry that has no attached issue.", | ||
"type": "fixed" | ||
} | ||
] | ||
``` | ||
|
||
See [template](/.changes/template) for sample object and array-based changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[ | ||
{ | ||
"description": "this is one added entry.", | ||
"issues": [630], | ||
"type": "added" | ||
}, | ||
{ | ||
"description": "this is another added entry.", | ||
"issues": [642], | ||
"type": "added" | ||
}, | ||
{ | ||
"description": "this is a fixed entry that has no attached issue.", | ||
"type": "fixed" | ||
}, | ||
{ | ||
"description": "this is a breaking change.", | ||
"issues": [679], | ||
"breaking": true, | ||
"type": "changed" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"description": "sample description for a PR adding one CHANGELOG entry.", | ||
"issues": [437], | ||
"type": "fixed" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"description": "this has 2 PRs associated.", | ||
"issues": [441], | ||
"type": "added" | ||
} |
Oops, something went wrong.