From c312280ab35b57143502aecef3d1308e2057f980 Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 7 Jul 2023 16:41:10 +0000 Subject: [PATCH] build(git-cliff): do not fail if commit.footers is undefined --- cliff.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cliff.toml b/cliff.toml index 0e1ed7438..86a2303e5 100644 --- a/cliff.toml +++ b/cliff.toml @@ -67,9 +67,11 @@ body = """ - {% if commit.breaking %}[**breaking**] {% endif %}\ {% if commit.scope %}{{ commit.scope }}: {% endif %}\ {{ commit.message | upper_first }}.\ - {% for footer in commit.footers %}{% if 'BREAKING CHANGE' in footer.token %} - {% raw %} {% endraw %}- {{ footer.value }}\ - {% endif %}{% endfor %}\ + {% if commit.footers is defined %}\ + {% for footer in commit.footers %}{% if 'BREAKING CHANGE' in footer.token %} + {% raw %} {% endraw %}- {{ footer.value }}\ + {% endif %}{% endfor %}\ + {% endif%}\ {% endfor %} {% endfor %}\n """