Skip to content

Commit

Permalink
Merge pull request #1196 from matrix-org/manu/4393_towncrier_release_…
Browse files Browse the repository at this point in the history
…script

Make Towncrier compatible with the release script
  • Loading branch information
manuroe authored Aug 11, 2021
2 parents 4da919f + 9e352a9 commit 454d9dc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ it is not encouraged, you can use:
- `pr-[PRNumber].type` for a PR with no related issue
- `sdk-[iOSSDKIssueNumber].type` for a PR related a matrix-ios-sdk issue
- `kit-[iOSKitIssueNumber].type` for a PR related a matrix-ios-kit issue
- `x-nolink-[AnyNumber].type` for a PR with a change entry that will not have a link automatically appended. It must be used for internal project update only. `AnyNumber` should be a value that does not clash with existing files.

To preview the changelog for pending changelog entries, use:

Expand Down
10 changes: 8 additions & 2 deletions changelog.d/_template.md.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,19 @@
{%- 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) -}}
{%- set pr = value.replace("pr-", "") -%}
{{- links.append( "[#%s](%s/pull/%s)" | format(pr, gh_sdk, 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(', ') }}
Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-1196.build
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGES.md: Use towncrier to manage the change log. More info in [CONTRIBUTING](CONTRIBUTING.md#changelog).

0 comments on commit 454d9dc

Please sign in to comment.