Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
juga
sbws
Commits
3bc35e6c
Commit
3bc35e6c
authored
Nov 24, 2018
by
juga
Browse files
new: Add gitchangelog template
parent
47128347
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitchangelogrst.tpl
0 → 100644
View file @
3bc35e6c
% if data["title"]:
$
{
data
[
"title"
]
}
\n
$
{
"="
*
len
(
data
[
"title"
])
}
% endif
% for version in data["versions"]:
<
%
title =
"%s (%s)"
%
(
version
["
tag
"],
version
["
date
"])
if
version
["
tag
"]
else
opts
["
unreleased_version_label
"]
nb_sections =
len(version["sections"])
%
>
$
{
title
}
$
{
"-"
*
len
(
title
)
}
% for section in version["sections"]:
% if not (section["label"] == "Other" and nb_sections == 1):
$
{
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
()
%
>
$
{
entry
}
% if commit["body"]:
$
{
indent
(
commit
[
"body"
])
}
% endif
% endfor
% endfor
% endfor
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment