CHANGES.md: Use towncrier to manage the change log

vector-im/element-ios#4393

More info in [CONTRIBUTING](CONTRIBUTING.md#changelog)
This commit is contained in:
manuroe
2021-08-09 15:57:14 +02:00
parent bcb3fa99a5
commit 0a7af23bd7
6 changed files with 102 additions and 3 deletions

View File

@@ -3,6 +3,6 @@
* [ ] I read the [contributing guide](https://github.com/vector-im/element-ios/blob/develop/CONTRIBUTING.md)
* [ ] UI change has been tested on both light and dark themes, in portrait and landscape orientations and on iPhone and iPad simulators
* [ ] Pull request is based on the develop branch
* [ ] Pull request updates [CHANGES.rst](https://github.com/vector-im/riot-ios/blob/develop/CHANGES.rst)
* [ ] Pull request contains a changelog file in ./changelog.d. See <https://github.com/matrix-org/matrix-ios-sdk/blob/develop/CONTRIBUTING.md#changelog>
* [ ] Pull request includes screenshots or videos of UI changes
* [ ] Pull request includes a [sign off](https://github.com/matrix-org/synapse/blob/master/CONTRIBUTING.md#sign-off)
* [ ] Pull request includes a [sign off](https://github.com/matrix-org/matrix-ios-sdk/blob/develop/CONTRIBUTING.md#sign-off)

View File

@@ -1,6 +1,6 @@
# Contributing code to Matrix
Please read Synapse [contributing guide](https://github.com/matrix-org/synapse/blob/master/CONTRIBUTING.md).
Please read the matrix-ios-sdk [contributing guide](https://github.com/matrix-org/matrix-ios-sdk/blob/develop/CONTRIBUTING.md).
# Contributing code to Element iOS

1
changelog.d/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
!.gitignore

1
changelog.d/4393.build Normal file
View File

@@ -0,0 +1 @@
CHANGES.md: Use towncrier to manage the change log. More info in [CONTRIBUTING](CONTRIBUTING.md#changelog).

View File

@@ -0,0 +1,52 @@
{# 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/vector-im/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(pr) | default("", True) -}}
{% else %}
{{- links.append(value) | default("", True) -}}
{% endif -%}
{% endfor -%}
- {{ text }} ({{ links | join(', ') }})
{% 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 %}

45
towncrier.toml Normal file
View File

@@ -0,0 +1,45 @@
[tool.towncrier]
name = "Changes in"
filename = "CHANGES.md"
directory = "changelog.d"
template = "changelog.d/_template.md.jinja"
[[tool.towncrier.type]]
directory = "feature"
name = "✨ Features"
showcontent = true
[[tool.towncrier.type]]
directory = "change"
name = "🙌 Improvements"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "🐛 Bugfixes"
showcontent = true
[[tool.towncrier.type]]
directory = "api"
name = "⚠️ API Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "i18n"
name = "🗣 Translations"
showcontent = true
[[tool.towncrier.type]]
directory = "build"
name = "🧱 Build"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "📄 Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Others"
showcontent = true