Skip to content

Commit 3e7e540

Browse files
authored
Improve changelog rendering format (#2169)
* Improve changelog rendering format Group changelog entries by change type, add a fallback section for unknown types, and re-render CHANGELOG.md. Also convert legacy reStructuredText-style links in historical change fragments to Markdown. * Fix changelog upgrade note links * Change link from awslabs to aws
1 parent 8a066bc commit 3e7e540

8 files changed

Lines changed: 668 additions & 421 deletions

File tree

.changes/0.5.1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
{
3535
"category": "deployment",
36-
"description": "Handle case where local policy does not exist\n(`29 <https://github.com/awslabs/chalice/issues/29>`__)",
36+
"description": "Handle case where local policy does not exist\n([#29](https://github.com/aws/chalice/issues/29))",
3737
"type": "bugfix"
3838
}
3939
]

.changes/0.6.0.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schema-version": "0.2",
3-
"summary": "Check out the `upgrade notes for 0.6.0\n<http://chalice.readthedocs.io/en/latest/upgrading.html#v0-6-0>`__\nfor more detailed information about changes in this release.\n\n",
3+
"summary": "Check out the [upgrade notes for 0.6.0](https://aws.github.io/chalice/upgrading#v0-6-0)\nfor more detailed information about changes in this release.\n\n",
44
"changes": [
55
{
66
"category": "local",

.changes/1.0.0b1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schema-version": "0.2",
3-
"summary": "Please read the `upgrade notes for 1.0.0b1\n<http://chalice.readthedocs.io/en/latest/upgrading.html#v1-0-0b1>`__\nfor more detailed information about upgrading to this release.\n\nNote: to install this beta version of chalice you must specify\n``pip install 'chalice>=1.0.0b1,<2.0.0'`` or\nuse the ``--pre`` flag for pip: ``pip install --pre chalice``.\n\n",
3+
"summary": "Please read the [upgrade notes for 1.0.0b1](https://aws.github.io/chalice/upgrading#b1)\nfor more detailed information about upgrading to this release.\n\nNote: to install this beta version of chalice you must specify\n``pip install 'chalice>=1.0.0b1,<2.0.0'`` or\nuse the ``--pre`` flag for pip: ``pip install --pre chalice``.\n\n",
44
"changes": [
55
{
66
"category": "rest-api",

.changes/1.0.0b2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schema-version": "0.2",
3-
"summary": "Please read the `upgrade notes for 1.0.0b2\n<http://chalice.readthedocs.io/en/latest/upgrading.html#v1-0-0b2>`__\nfor more detailed information about upgrading to this release.\n\nNote: to install this beta version of chalice you must specify\n``pip install 'chalice>=1.0.0b2,<2.0.0'`` or\nuse the ``--pre`` flag for pip: ``pip install --pre chalice``.\n",
3+
"summary": "Please read the [upgrade notes for 1.0.0b2](https://aws.github.io/chalice/upgrading#b2)\nfor more detailed information about upgrading to this release.\n\nNote: to install this beta version of chalice you must specify\n``pip install 'chalice>=1.0.0b2,<2.0.0'`` or\nuse the ``--pre`` flag for pip: ``pip install --pre chalice``.\n",
44
"changes": [
55
{
66
"category": "local",

.changes/1.0.1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
{
1515
"category": "rest-api",
16-
"description": "Fix api gateway stage being set incorrectly in non-default chalice stage\n(`#$70 <https://github.com/aws/chalice/issues/470>`__)",
16+
"description": "Fix api gateway stage being set incorrectly in non-default chalice stage\n([#470](https://github.com/aws/chalice/issues/470))",
1717
"type": "bugfix"
1818
}
1919
]

.changes/1.2.0.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schema-version": "0.2",
3-
"summary": "This release features a rewrite of the core deployment\ncode used in Chalice. This is a backwards compatible change\nfor users, but you may see changes to the autogenerated\nfiles Chalice creates.\nPlease read the `upgrade notes for 1.2.0\n<http://chalice.readthedocs.io/en/latest/upgrading.html#v1-2-0>`__\nfor more detailed information about upgrading to this release.\n\n",
3+
"summary": "This release features a rewrite of the core deployment\ncode used in Chalice. This is a backwards compatible change\nfor users, but you may see changes to the autogenerated\nfiles Chalice creates.\nPlease read the [upgrade notes for 1.2.0](https://aws.github.io/chalice/upgrading#v1-2-0)\nfor more detailed information about upgrading to this release.\n\n",
44
"changes": [
55
{
66
"category": "rest-api",

.changes/templates/changelog

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
1-
# CHANGELOG
1+
# Changelog
22

33
{% for release, changes in releases %}
4-
## {{ release }}
4+
## v{{ release }}
55
{% if changes.summary %}
66
{{ changes.summary -}}
77
{% endif %}
8-
{% for change in changes.changes %}
9-
* {{ change.type }}:{{ change.category }}:{{ change.description -}}
10-
{% endfor %}
8+
{%- for type_name in ['feature', 'enhancement', 'bugfix'] %}
9+
{%- for change in changes.changes if change.type == type_name %}
10+
{%- if loop.first %}
11+
{%- if type_name == 'feature' %}
12+
13+
### Features
14+
{%- elif type_name == 'enhancement' %}
15+
16+
### Enhancements
17+
{%- elif type_name == 'bugfix' %}
18+
19+
### Bug fixes
20+
{%- endif %}
21+
{%- endif %}
22+
* {{ change.description }}
23+
{%- endfor %}
24+
{%- endfor %}
25+
{%- for change in changes.changes if change.type not in ['feature', 'enhancement', 'bugfix'] %}
26+
{%- if loop.first %}
27+
28+
### Other
29+
{%- endif %}
30+
* {{ change.description }}
31+
{%- endfor %}
1132
{% endfor %}

0 commit comments

Comments
 (0)