Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Towncrier compatible with the release script #1196

Merged
merged 4 commits into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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).