From 0025cd62fe1015e4517118eff3abbf7cae2beac4 Mon Sep 17 00:00:00 2001 From: rjdbcm Date: Tue, 2 Jul 2024 23:46:35 -0500 Subject: [PATCH] :bug: CHANGELOG duplicated commit headings fixed Signed-off-by: rjdbcm --- requirements.in | 2 +- templates/.parsed_commit_heading.j2 | 142 ++++++++++++++++++++++++++++ templates/CHANGELOG.md.j2 | 4 +- 3 files changed, 145 insertions(+), 3 deletions(-) diff --git a/requirements.in b/requirements.in index 5aec2c8e..d178140d 100644 --- a/requirements.in +++ b/requirements.in @@ -4,7 +4,7 @@ idna>=2 jinja2>=3 meson[ninja]>=1.1.0 ozi-spec~=0.4 -ozi-templates~=2.4.5 +ozi-templates~=2.4.6 packaging~=24.0 pip-tools prompt_toolkit diff --git a/templates/.parsed_commit_heading.j2 b/templates/.parsed_commit_heading.j2 index 98d0bd49..7490ba53 100644 --- a/templates/.parsed_commit_heading.j2 +++ b/templates/.parsed_commit_heading.j2 @@ -1,3 +1,74 @@ +{%- filter replace(':art:', '๐ŸŽจ') %} +{%- filter replace(':zap:', 'โšก๏ธ') %} +{%- filter replace(':fire:', '๐Ÿ”ฅ') %} +{%- filter replace(':bug:', '๐Ÿ›') %} +{%- filter replace(':ambulance:', '๐Ÿš‘๏ธ') %} +{%- filter replace(':sparkles:', 'โœจ') %} +{%- filter replace(':memo:', '๐Ÿ“') %} +{%- filter replace(':rocket:', '๐Ÿš€') %} +{%- filter replace(':tada:', '๐ŸŽ‰') %} +{%- filter replace(':white_check_mark:', 'โœ…') %} +{%- filter replace(':lock:', '๐Ÿ”’๏ธ') %} +{%- filter replace(':closed_lock_with_key:', '๐Ÿ”') %} +{%- filter replace(':bookmark:', '๐Ÿ”–') %} +{%- filter replace(':rotating_light:', '๐Ÿšจ') %} +{%- filter replace(':construction:', '๐Ÿšง') %} +{%- filter replace(':green_heart:', '๐Ÿ’š') %} +{%- filter replace(':arrow_down:', 'โฌ‡๏ธ') %} +{%- filter replace(':arrow_up:', 'โฌ†๏ธ') %} +{%- filter replace(':pushpin:', '๐Ÿ“Œ') %} +{%- filter replace(':construction_worker:', '๐Ÿ‘ท') %} +{%- filter replace(':chart_with_upwards_trend:', '๐Ÿ“ˆ') %} +{%- filter replace(':recycle:', 'โ™ป๏ธ') %} +{%- filter replace(':heavy_plus_sign:', 'โž•') %} +{%- filter replace(':heavy_minus_sign:', 'โž–') %} +{%- filter replace(':wrench:', '๐Ÿ”ง') %} +{%- filter replace(':hammer:', '๐Ÿ”จ') %} +{%- filter replace(':globe_with_meridians:', '๐ŸŒ') %} +{%- filter replace(':pencil2:', 'โœ๏ธ') %} +{%- filter replace(':poop:', '๐Ÿ’ฉ') %} +{%- filter replace(':rewind:', 'โช๏ธ') %} +{%- filter replace(':twisted_rightwards_arrows:', '๐Ÿ”€') %} +{%- filter replace(':package:', '๐Ÿ“ฆ๏ธ') %} +{%- filter replace(':alien:', '๐Ÿ‘ฝ๏ธ') %} +{%- filter replace(':truck:', '๐Ÿšš') %} +{%- filter replace(':page_facing_up:', '๐Ÿ“„') %} +{%- filter replace(':boom:', '๐Ÿ’ฅ') %} +{%- filter replace(':bento:', '๐Ÿฑ') %} +{%- filter replace(':wheelchair:', 'โ™ฟ๏ธ') %} +{%- filter replace(':bulb:', '๐Ÿ’ก') %} +{%- filter replace(':beers:', '๐Ÿป') %} +{%- filter replace(':speech_balloon:', '๐Ÿ’ฌ') %} +{%- filter replace(':card_file_box:', '๐Ÿ—ƒ๏ธ') %} +{%- filter replace(':loud_sound:', '๐Ÿ”Š') %} +{%- filter replace(':mute:', '๐Ÿ”‡') %} +{%- filter replace(':busts_in_silhouette:', '๐Ÿ‘ฅ') %} +{%- filter replace(':children_crossing:', '๐Ÿšธ') %} +{%- filter replace(':building_construction:', '๐Ÿ—๏ธ') %} +{%- filter replace(':clown_face:', '๐Ÿคก') %} +{%- filter replace(':egg:', '๐Ÿฅš') %} +{%- filter replace(':see_no_evil:', '๐Ÿ™ˆ') %} +{%- filter replace(':camera_flash:', '๐Ÿ“ธ') %} +{%- filter replace(':alembic:', 'โš—๏ธ') %} +{%- filter replace(':mag:', '๐Ÿ”๏ธ') %} +{%- filter replace(':label:', '๐Ÿท๏ธ') %} +{%- filter replace(':seedling:', '๐ŸŒฑ') %} +{%- filter replace(':triangular_flag_on_post:', '๐Ÿšฉ') %} +{%- filter replace(':goal_net:', '๐Ÿฅ…') %} +{%- filter replace(':dizzy:', '๐Ÿ’ซ') %} +{%- filter replace(':wastebasket:', '๐Ÿ—‘๏ธ') %} +{%- filter replace(':passport_control:', '๐Ÿ›‚') %} +{%- filter replace(':adhesive_bandage:', '๐Ÿฉน') %} +{%- filter replace(':monocle_face:', '๐Ÿง') %} +{%- filter replace(':coffin:', 'โšฐ๏ธ') %} +{%- filter replace(':test_tube:', '๐Ÿงช') %} +{%- filter replace(':necktie:', '๐Ÿ‘”') %} +{%- filter replace(':stethoscope:', '๐Ÿฉบ') %} +{%- filter replace(':bricks:', '๐Ÿงฑ') %} +{%- filter replace(':technologist:', '๐Ÿง‘โ€๐Ÿ’ป') %} +{%- filter replace(':money_with_wings:', '๐Ÿ’ธ') %} +{%- filter replace(':thread:', '๐Ÿงต') %} +{%- filter replace(':safety_vest:', '๐Ÿฆบ') %} {%- if type_ in [':bug:', 'BUG', 'fix'] %} ### :bug: Fixed Bugs {%- elif type_ in [':memo:', 'DOC', 'docs'] %} @@ -37,3 +108,74 @@ {%- else %} ### {{ type_ | capitalize }} {% endif %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} +{%- endfilter %} \ No newline at end of file diff --git a/templates/CHANGELOG.md.j2 b/templates/CHANGELOG.md.j2 index 4064b02c..58d47835 100644 --- a/templates/CHANGELOG.md.j2 +++ b/templates/CHANGELOG.md.j2 @@ -5,6 +5,7 @@ {#- UNRELEASED -#} ## Unreleased {% for type_, commits in context.history.unreleased | dictsort %} +{% include '.parsed_commit_heading.j2' %} {% for commit in commits %}{% if type_ != "unknown" %} {%- filter replace(':art:', '๐ŸŽจ') %} {%- filter replace(':zap:', 'โšก๏ธ') %} @@ -77,7 +78,6 @@ {%- filter replace(':money_with_wings:', '๐Ÿ’ธ') %} {%- filter replace(':thread:', '๐Ÿงต') %} {%- filter replace(':safety_vest:', '๐Ÿฆบ') %} -{% include '.parsed_commit_heading.j2' %} * {{ commit.commit.message.rstrip()|replace(type_~': ','')|replace(type_,'')|replace('---', '')|replace('\n\nSigned-off-by:', ' โ€”') }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }})) {%- endfilter %} @@ -161,6 +161,7 @@ {% for version, release in context.history.released.items() %} ## {{ version.as_tag() }} ({{ release.tagged_date.strftime("%Y-%m-%d") }}) {% for type_, commits in release["elements"] | dictsort %} +{% include '.parsed_commit_heading.j2' %} {% for commit in commits %}{% if type_ != "unknown" %} {%- filter replace(':art:', '๐ŸŽจ') %} {%- filter replace(':zap:', 'โšก๏ธ') %} @@ -233,7 +234,6 @@ {%- filter replace(':money_with_wings:', '๐Ÿ’ธ') %} {%- filter replace(':thread:', '๐Ÿงต') %} {%- filter replace(':safety_vest:', '๐Ÿฆบ') %} -{% include '.parsed_commit_heading.j2' %} * {{ commit.commit.message.rstrip()|replace(type_~': ','')|replace(type_,'')|replace('---', '')|replace('\n\nSigned-off-by:', ' โ€”') }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }})) {%- endfilter %}