diff --git a/.snippets/16.md b/.snippets/16.md new file mode 100644 index 0000000..895d70d --- /dev/null +++ b/.snippets/16.md @@ -0,0 +1,9 @@ +## Add comment with meta data below every changelog entry + + +- add comment with meta data below every changelog entry for later parsing, closes #16 +- update `README` badge to show support for Python 3.9 - 3.11 instead of generic Python 3 diff --git a/snippets2changelog/creator.py b/snippets2changelog/creator.py index 05d38b1..59cc3c1 100644 --- a/snippets2changelog/creator.py +++ b/snippets2changelog/creator.py @@ -109,6 +109,11 @@ def update_changelog(self) -> None: changelog_entry_content = { "version": self.semver_data, "timestamp": commit.committed_datetime.isoformat(), + "meta": { + "type": snippet_content["type"], + "scope": snippet_content["scope"], + "affected": snippet_content["affected"], + }, "content": snippet_content["details"], "version_reference": f"https://github.com/brainelectronics/snippets2changelog/tree/{self.semver_data}", } diff --git a/snippets2changelog/templates/changelog_part.md.template b/snippets2changelog/templates/changelog_part.md.template index 2ed8fdc..5d1d165 100644 --- a/snippets2changelog/templates/changelog_part.md.template +++ b/snippets2changelog/templates/changelog_part.md.template @@ -1,4 +1,7 @@ ## [{{ version }}] - {{ timestamp }} +{%- if meta %} + +{%- endif %} {{- content }} [{{ version }}]: {{ version_reference }}