mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-05-28 18:43:40 +00:00
cliff.toml: - Extract Impact footer value from commit footers and use as release note text when present, falling back to scope+message format otherwise - Fix whitespace in body template (remove extra indentation) scripts/release/generate-notes: - Add RELEASE_NOTES_TRAILER_SKIP_FILTER to exclude commits marked with Release-Notes: skip, User-Impact: none, or Released-Bug: no trailers - Add RELEASE_NOTES_COMPACT_DIFF and RELEASE_NOTES_DIFF_MAX_BYTES to limit AI diff context size for faster, more focused prompts - Add RELEASE_NOTES_CLIFF_FILTER_PATHS to restrict cliff to user-facing paths only when generating AI-assisted notes - Add RELEASE_NOTES_CLIFF_SINGLE_RELEASE to pass --latest to cliff - Define USER_FACING_PATHS list for scoped AI diff context Release-Notes: skip User-Impact: none
73 lines
3.2 KiB
TOML
73 lines
3.2 KiB
TOML
# Configuration for git-cliff
|
|
# See: https://git-cliff.org/docs/configuration
|
|
|
|
[changelog]
|
|
# Template for the changelog body
|
|
header = ""
|
|
body = """
|
|
{% for group, commits in commits | group_by(attribute="group") -%}
|
|
### {{ group | striptags | trim | upper_first }}
|
|
{% for commit in commits -%}
|
|
{% set impact_text = "" -%}
|
|
{% set footers = commit.footers | default(value=[]) -%}
|
|
{% for footer in footers -%}
|
|
{% if footer.token == "Impact" -%}
|
|
{% set impact_text = footer.value -%}
|
|
{% endif -%}
|
|
{% endfor -%}
|
|
- {% if impact_text %}{{ impact_text | trim | upper_first }}{% else %}{% if commit.scope %}**{{ commit.scope }}**: {% endif %}{{ commit.message | upper_first }}{% endif %}{% if commit.breaking %} [**BREAKING**]{% endif %} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/jpawlowski/hass.tibber_prices/commit/{{ commit.id }}))
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
---
|
|
|
|
If this release saved you some money on your electricity bill, a coffee would be much appreciated! ☕
|
|
|
|
[](https://www.buymeacoffee.com/jpawlowski)
|
|
"""
|
|
trim = true
|
|
|
|
[git]
|
|
# Parse conventional commits
|
|
conventional_commits = true
|
|
# Keep unconventional commits in parsing pipeline; parser rules decide what to skip.
|
|
# This avoids noisy parse-error warnings on older commit history.
|
|
filter_unconventional = false
|
|
split_commits = false
|
|
|
|
# Commit parsers - map commit types to categories
|
|
commit_parsers = [
|
|
# Skip manifest.json version bumps (release housekeeping)
|
|
{ message = "^chore\\(release\\): bump version", skip = true },
|
|
# Skip explicit revert commits; final net state should drive release notes
|
|
{ message = "^revert", skip = true },
|
|
# Skip development environment changes (not user-relevant)
|
|
{ message = "^(feat|fix|chore|refactor)\\((devcontainer|vscode|scripts|dev-env|environment)\\):", skip = true },
|
|
# Skip CI/CD infrastructure changes (not user-relevant)
|
|
{ message = "^(feat|fix|chore|ci)\\((ci|workflow|actions|github-actions)\\):", skip = true },
|
|
# Skip non-user-facing fix scopes
|
|
{ message = "^fix\\((docs|lint|types|tests?|ci|workflow|scripts|devcontainer|vscode|build|release)\\):", skip = true },
|
|
# User-facing categories aligned with AI output style
|
|
{ message = "^feat", group = "🎉 What's New" },
|
|
{ message = "^fix", group = "🐛 Fixed" },
|
|
{ message = "^perf", group = "⚡ More Reliable" },
|
|
{ message = "^chore\\(deps\\):", group = "📦 Updated Dependencies" },
|
|
# Skip mostly developer-facing categories
|
|
{ message = "^docs?", skip = true },
|
|
{ message = "^refactor", skip = true },
|
|
{ message = "^style", skip = true },
|
|
{ message = "^test", skip = true },
|
|
{ message = "^build", skip = true },
|
|
{ message = "^chore", skip = true },
|
|
# Final fallback to avoid ungrouped commits
|
|
{ message = ".*", skip = true },
|
|
]
|
|
|
|
# Protect breaking changes
|
|
commit_preprocessors = [
|
|
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/jpawlowski/hass.tibber_prices/issues/${2}))" },
|
|
]
|
|
|
|
# Apply commit parser filtering rules
|
|
filter_commits = true
|