Skip to content

feat(templating): Implemented group_by_scope filter#1547

Draft
Noai-oss wants to merge 2 commits into
orhun:mainfrom
Noai-oss:feat/add_group_by_scope_filter
Draft

feat(templating): Implemented group_by_scope filter#1547
Noai-oss wants to merge 2 commits into
orhun:mainfrom
Noai-oss:feat/add_group_by_scope_filter

Conversation

@Noai-oss

@Noai-oss Noai-oss commented Jun 1, 2026

Copy link
Copy Markdown

Description

Motivation and Context

fixes #1247

Implemented group_by_scope filter for release array, it will map the scope together. it's also support release-0.1.0's semver version with number.

How Has This Been Tested?

  {% for version, releases in releases | group_by_scope(attribute="version", scope="minor") %}
    {% if version %}
      ## {{ version }}
    {% else %}
      ## Unreleased
    {% endif %}
    {% set_global commits = [] %}
    {% for release in releases %}
      {% set_global commits = commits | concat(with=release.commits) %}
    {% endfor %}
    {% for group, commits in commits | group_by(attribute="group") %}
      ### {{ group }}
    {% endfor %}
  {% endfor %}

Screenshots / Logs (if applicable)

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly (if applicable).
  • I have formatted the code with rustfmt.
    • cargo +nightly fmt --all
  • I checked the lints with clippy.
    • cargo clippy --tests --verbose -- -D warnings
  • I have added tests to cover my changes.
  • All new and existing tests passed.
    • cargo test

@welcome

welcome Bot commented Jun 1, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️

@codecov-commenter

codecov-commenter commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.72340% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.30%. Comparing base (772e01d) to head (892f9be).

Files with missing lines Patch % Lines
git-cliff-core/src/template.rs 78.73% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1547      +/-   ##
==========================================
+ Coverage   48.65%   49.30%   +0.65%     
==========================================
  Files          26       26              
  Lines        2288     2335      +47     
==========================================
+ Hits         1113     1151      +38     
- Misses       1175     1184       +9     
Flag Coverage Δ
unit-tests 49.30% <78.73%> (+0.65%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support grouping changelog entries by minor version instead of per patch tag

2 participants