From fc450c4de4da7fdd957bea3b3daa0bab7806ec7b Mon Sep 17 00:00:00 2001 From: Charles Moore Date: Wed, 21 Feb 2024 19:53:48 +0000 Subject: [PATCH] chore: Add changelog config Signed-off-by: Charles Moore <122481442+moorec-aws@users.noreply.github.com> --- .semantic_release/CHANGELOG.md.j2 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .semantic_release/CHANGELOG.md.j2 diff --git a/.semantic_release/CHANGELOG.md.j2 b/.semantic_release/CHANGELOG.md.j2 new file mode 100644 index 0000000..2dcaa1f --- /dev/null +++ b/.semantic_release/CHANGELOG.md.j2 @@ -0,0 +1,25 @@ +{% for version, release in context.history.released.items() %} +## {{ version.as_tag() }} ({{ release.tagged_date.strftime("%Y-%m-%d") }}) + + {% if "breaking" in release["elements"] %} +### BREAKING CHANGES + {% for commit in release["elements"]["breaking"] %} +* {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.commit.summary[commit.commit.summary.find(": ")+1:].strip() }} ([`{{ commit.short_hash }}`]({{ commit.commit.hexsha | commit_hash_url }})) + {% endfor %} + {% endif %} + + {% if "feature" in release["elements"] %} +### Features + {% for commit in release["elements"]["feature"] %} +* {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.commit.summary[commit.commit.summary.find(": ")+1:].strip() }} ([`{{ commit.short_hash }}`]({{ commit.commit.hexsha | commit_hash_url }})) + {% endfor %} + {% endif %} + + {% if "fix" in release["elements"] %} +### Bug Fixes + {% for commit in release["elements"]["fix"] %} +* {% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.commit.summary[commit.commit.summary.find(":")+1:].strip() }} ([`{{ commit.short_hash }}`]({{ commit.commit.hexsha | commit_hash_url }})) + {% endfor %} + {% endif %} + +{% endfor %} \ No newline at end of file