-
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.
docs: set up python-semantic-release templates (#21)
Fixes #3
- Loading branch information
1 parent
ecf16ee
commit bcd976a
Showing
3 changed files
with
41 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{%- set commit_type_heading_mapping = ( | ||
("breaking", "Breaking Changes"), | ||
("feature", "Features"), | ||
("fix", "Bug Fixes"), | ||
("performance", "Performance improvements"), | ||
("refactor", "Code Refactoring"), | ||
("test", "Testing"), | ||
("documentation", "Documentation"), | ||
) -%} | ||
|
||
{% for commit_type, heading in commit_type_heading_mapping if commit_type in release["elements"] %} | ||
### {{ heading }} | ||
|
||
{% for commit in release["elements"][commit_type] -%} | ||
- {% if commit.scope %}**{{ commit.scope }}:** {% endif %}{{ commit.descriptions[0] }} ([`{{ commit.short_hash }}`]({{ commit.hexsha|commit_hash_url }})) | ||
{% endfor %}{% endfor %} |
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,4 @@ | ||
{%- set releases = context.history.released.items() | list -%} | ||
{%- set prev_version = releases[1][0] -%} | ||
{% include ".changes.j2" %} | ||
{{ "**Full Changelog**: (%s)" | format(prev_version | compare_url(version)) }} |
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,21 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). See | ||
[conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit guidelines. | ||
|
||
{# UNRELEASED -#} | ||
{% set last_release = context.history.released.items() | first | first -%} | ||
## {{ "[Unreleased](%s)" | format(last_release.as_tag() | compare_url("main")) }} | ||
|
||
{# RELEASED -#} | ||
{% for version, release in context.history.released.items() -%} | ||
{%- if loop.nextitem -%} | ||
{%- set compare_url_ = loop.nextitem[0] | compare_url(version) -%} | ||
## [{{ version.as_tag() }}]({{ compare_url_ }}) ({{ release.tagged_date.strftime("%Y-%m-%d") }}) | ||
{% else -%} | ||
## {{ version.as_tag() }} ({{ release.tagged_date.strftime("%Y-%m-%d") }}) | ||
{% endif -%} | ||
{% include ".changes.j2" %} | ||
{%- endfor -%} |