Skip to content

Commit

Permalink
🐛 CHANGELOG duplicated commit headings fixed
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <[email protected]>
  • Loading branch information
rjdbcm committed Jul 3, 2024
1 parent 6298314 commit 0025cd6
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
142 changes: 142 additions & 0 deletions templates/.parsed_commit_heading.j2
Original file line number Diff line number Diff line change
@@ -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'] %}
Expand Down Expand Up @@ -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 %}
4 changes: 2 additions & 2 deletions templates/CHANGELOG.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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:', '⚡️') %}
Expand Down Expand Up @@ -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 %}
Expand Down Expand Up @@ -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:', '⚡️') %}
Expand Down Expand Up @@ -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 %}
Expand Down

0 comments on commit 0025cd6

Please sign in to comment.