-
Notifications
You must be signed in to change notification settings - Fork 505
/
Copy path_template.md.jinja
58 lines (50 loc) · 2.04 KB
/
_template.md.jinja
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{# iOS Repositories #}
{%- set gh_sdk = "https://github.com/matrix-org/matrix-ios-sdk" -%}
{%- set gh_kit = "https://github.com/matrix-org/matrix-ios-kit" -%}
{%- set gh_element = "https://github.com/element-hq/element-ios" -%}
## {{ versiondata.name }} {{ versiondata.version }} ({{ versiondata.date }})
{% for section, _ in sections.items() %}
{% 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() %}
{# Build all types of links we can have from our different repositories #}
{%- set links = [] -%}
{%- for value in values %}
{%- if value.startswith("sdk-") %}
{%- set gh_issue = value.replace("sdk-", "") -%}
{{- links.append( "[#%s](%s/issues/%s)" | format(gh_issue, gh_sdk, gh_issue) ) | default("", True) -}}
{%- elif value.startswith("kit-") %}
{%- set gh_issue = value.replace("kit-", "") -%}
{{- links.append( "[#%s](%s/issues/%s)" | format(gh_issue, gh_kit, gh_issue) ) | default("", True) -}}
{%- elif value.startswith("#") %}
{%- set gh_issue = value.replace("#", "") -%}
{{- links.append( "[#%s](%s/issues/%s)" | format(gh_issue, gh_element, gh_issue) ) | default("", True) -}}
{%- elif value.startswith("pr-") %}
{%- set pr = value.replace("pr-", "") -%}
{{- links.append( "[#%s](%s/pull/%s)" | format(pr, gh_element, pr) ) | default("", True) -}}
{%- elif value.startswith("x-nolink-") %}
{{- nil | default("", True) -}}
{% else %}
{{- links.append(value) | default("", True) -}}
{% endif -%}
{% endfor -%}
{% if links|length == 0 %}
- {{ text }}
{% else %}
- {{ text }} ({{ links | join(', ') }})
{% endif %}
{% endfor %}
{% else %}
- {{ sections[section][category]['']|join(', ') }}
{% endif %}
{% if sections[section][category]|length == 0 %}
No significant changes.
{% else %}
{% endif %}
{% endfor %}
{% else %}
No significant changes.
{% endif %}
{% endfor %}