Skip to content

Commit be1d663

Browse files
authored
Notes improvements for github and in-app changelog (#10490)
2 parents 2cc1add + ca2b926 commit be1d663

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

scripts/ci/render-notes.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@ def render_notes(
8787
tag = note["tag"].lower().capitalize()
8888
if tag not in render_data["releases"][vers]["notes"]:
8989
render_data["releases"][vers]["notes"][tag] = []
90-
render_data["releases"][vers]["notes"][tag].append(
91-
note["note"].strip()
92-
)
90+
note_entry = {
91+
"text": note["note"].strip(),
92+
"issues": note.get("issues", []),
93+
}
94+
render_data["releases"][vers]["notes"][tag].append(note_entry)
9395
render_data["releases"][vers]["long_notes"].append(note["note"].strip())
9496
if "short_note" in note:
9597
tag = note["tag"].lower().capitalize()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% for tag, long_notes in notes.items() %}
22
{{ tag }}:
33
{%- for note in long_notes %}
4-
- {{ note }}
4+
- {{ note.text }}{% if note.issues %} ({% for issue in note.issues %}#{{ issue }}{% if not loop.last %}, {% endif %}{% endfor %}){% endif %}
55
{%- endfor %}
66

77
{% endfor %}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<release version="{{ version }}" versioncode="{{ versioncode }}" date="{{ date }}">
2-
{%- for note in long_notes %}
3-
<change>{{ note }}</change>
2+
{%- for tag, tag_notes in notes.items() %}
3+
{%- for note in tag_notes %}
4+
<change>{{ tag }}: {{ note.text }}</change>
5+
{%- endfor %}
46
{%- endfor %}
57
</release>
68

0 commit comments

Comments
 (0)