[tor-commits] [sbws/maint-1.1] fix: Use rst changelog template

juga at torproject.org juga at torproject.org
Fri Apr 16 11:45:06 UTC 2021


commit bda888e9d9fdeb38dd9c1a121d113c0918f4d049
Author: juga0 <juga at riseup.net>
Date:   Fri Apr 9 10:17:46 2021 +0000

    fix: Use rst changelog template
    
    and put in the same entry commit subject and body removing new lines.
    
    Closes: #40004
---
 .gitchangelog.rc     |  3 ++-
 .gitchangelogrst.tpl | 12 ++++--------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/.gitchangelog.rc b/.gitchangelog.rc
index 264e5d7..9024f24 100644
--- a/.gitchangelog.rc
+++ b/.gitchangelog.rc
@@ -187,7 +187,8 @@ unreleased_version_label = "Unreleased"
 ##        Examples:
 ##           - makotemplate("restructuredtext")
 ##
-output_engine = rest_py
+#output_engine = rest_py
+output_engine = makotemplate(".gitchangelogrst.tpl")
 #output_engine = mustache("restructuredtext")
 #output_engine = mustache("markdown")
 #output_engine = makotemplate("restructuredtext")
diff --git a/.gitchangelogrst.tpl b/.gitchangelogrst.tpl
index 46f02a3..d0ba6ce 100644
--- a/.gitchangelogrst.tpl
+++ b/.gitchangelogrst.tpl
@@ -19,15 +19,11 @@ ${section["label"]}
 ${"~" * len(section["label"])}
 % endif
 % for commit in section["commits"]:
-<%
-subject = "%s [%s]" % (commit["subject"], ", ".join(commit["authors"]))
-entry = indent('\n'.join(textwrap.wrap(subject)),
-                       first="- ").strip()
+<% c = commit["subject"]
+if commit["body"]:
+  c += "\n" + commit["body"].replace("\n\n", "\n")
+entry = indent(c, first="- ").strip()
 %>${entry}
-
-% if commit["body"]:
-${indent(commit["body"])}
-% endif
 % endfor
 % endfor
 





More information about the tor-commits mailing list