forked from OCA/maintainer-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] oca-towncrier: Add support for Mardown format
If readme fragments uses the md format, generate the history file into the same format
- Loading branch information
Showing
4 changed files
with
153 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{% if render_title %} | ||
{% if versiondata.name %} | ||
## {{ versiondata.name }} {{ versiondata.version }} ({{ versiondata.date }}) | ||
{% else %} | ||
## {{ versiondata.version }} ({{ versiondata.date }}) | ||
{% endif %} | ||
{% endif %} | ||
{% for section, _ in sections.items() %} | ||
{% if section %} | ||
|
||
### {{section}} | ||
{% endif %} | ||
|
||
{% if sections[section] %} | ||
{% for category, val in definitions.items() if category in sections[section] %} | ||
#### {{ definitions[category]['name'] }} | ||
|
||
{% if definitions[category]['showcontent'] %} | ||
{% for text, values in sections[section][category].items() %} | ||
- {{ text }} | ||
{%- if values %} | ||
{% if "\n - " in text or '\n * ' in text %} | ||
|
||
|
||
( | ||
{%- else %} | ||
( | ||
{%- endif -%} | ||
{%- for issue in values %} | ||
{{ issue.split(": ", 1)[0] }}{% if not loop.last %}, {% endif %} | ||
{%- endfor %} | ||
) | ||
{% else %} | ||
|
||
{% endif %} | ||
{% endfor %} | ||
|
||
{% else %} | ||
- {% for issue in sections[section][category][''] %} | ||
{{ issue.split(": ", 1)[0] }}{% if not loop.last %}, {% endif %} | ||
{% endfor %} | ||
|
||
|
||
{% endif %} | ||
{% if issues_by_category[section][category] and "]: " in issues_by_category[section][category][0] %} | ||
{% for issue in issues_by_category[section][category] %} | ||
{{ issue }} | ||
{% endfor %} | ||
|
||
{% endif %} | ||
{% if sections[section][category]|length == 0 %} | ||
No significant changes. | ||
|
||
{% else %} | ||
{% endif %} | ||
{% endfor %} | ||
{% else %} | ||
No significant changes. | ||
|
||
{% endif %} | ||
{% endfor +%} | ||
{# | ||
This comment adds one more newline at the end of the rendered newsfile content. | ||
In this way the there are 2 newlines between the latest release and the previous release content. | ||
#} |