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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
{% from ".components/macros.md.j2" import format_link
%}{# EXAMPLE:
## v1.0.0 (2020-01-01)
_This release is published under the MIT License._
### ✨ Features
- Add new feature ([PR#10](https://domain.com/namespace/repo/pull/10), [`abcdef0`](https://domain.com/namespace/repo/commit/HASH))
- **scope**: Add new feature ([`abcdef0`](https://domain.com/namespace/repo/commit/HASH))
### 🪲 Bug Fixes
- Fix bug ([PR#11](https://domain.com/namespace/repo/pull/11), [`abcdef1`](https://domain.com/namespace/repo/commit/HASH))
### 💥 Breaking Changes
- With the change _____, the change causes ___ effect. Ultimately, this section it is a more detailed description of the breaking change. With an optional scope prefix like the commit messages above.
- **scope**: this breaking change has a scope to identify the part of the code that this breaking change applies to for better context.
### 💡 Additional Release Information
- This is a release note that provides additional information about the release that is not a breaking change or a feature/bug fix.
- **scope**: this release note has a scope to identify the part of the code that this release note applies to for better context.
### ✅ Resolved Issues
- [#000](https://domain.com/namespace/repo/issues/000): _Title_
---
**Detailed Changes**: [vX.X.X...vX.X.X](https://domain.com/namespace/repo/compare/vX.X.X...vX.X.X)
---
**Installable artifacts are available from**:
- [PyPi Registry](https://pypi.org/project/package_name/x.x.x)
- [GitHub Release Assets](https://github.com/namespace/repo/releases/tag/vX.X.X)
#}{# # Set line width to 1000 to avoid wrapping as GitHub will handle it
#}{% set max_line_width = max_line_width | default(1000)
%}{% set hanging_indent = hanging_indent | default(2)
%}{% set license_name = license_name | default("", True)
%}{% set releases = context.history.released.values() | list
%}{% set curr_release_index = releases.index(release)
%}{#
#}{% if mask_initial_release and curr_release_index == releases | length - 1
%}{# # On a first release, generate our special message
#}{% include ".components/first_release.md.j2"
%}{% else
%}{# # Not the first release so generate notes normally
#}{% include ".components/versioned_changes.md.j2"
-%}{#
# # If there are any commits that resolve issues, list out the issues with links
#}{% set issue_resolving_commits = []
%}{% for commits in release["elements"].values()
%}{% set _ = issue_resolving_commits.extend(
commits | rejectattr("error", "defined") | selectattr("linked_issues")
)
%}{% endfor
%}{% if issue_resolving_commits | length > 0
%}{{
"\n### ✅ Resolved Issues\n"
}}{#
#}{% set issue_numbers = []
%}{% for linked_issues in issue_resolving_commits | map(attribute="linked_issues")
%}{% set _ = issue_numbers.extend(linked_issues)
%}{% endfor
%}{% for issue_num in issue_numbers | unique | sort_numerically
%}{{
"\n- %s: _Title_\n" | format(format_link(issue_num | issue_url, issue_num))
}}{#
#}{% endfor
%}{% endif
%}{#
#}{% set prev_release_index = curr_release_index + 1
%}{#
#}{% if 'compare_url' is filter and prev_release_index < releases | length
%}{% set prev_version_tag = releases[prev_release_index].version.as_tag()
%}{% set new_version_tag = release.version.as_tag()
%}{% set version_compare_url = prev_version_tag | compare_url(new_version_tag)
%}{% set detailed_changes_link = '[{}...{}]({})'.format(
prev_version_tag, new_version_tag, version_compare_url
)
%}{{ "\n"
}}{{ "---\n"
}}{{ "\n"
}}{{ "**Detailed Changes**: %s" | format(detailed_changes_link)
}}{{ "\n"
}}{% endif
%}{% endif
%}{#
#}
---
**Installable artifacts are available from**:
{{
"- %s" | format(
format_link(
repo_name | create_pypi_url(release.version | string),
"PyPi Registry",
)
)
}}
{{
"- %s" | format(
format_link(
release.version.as_tag() | create_release_url,
"{vcs_name} Release Assets" | format_w_official_vcs_name,
)
)
}}
|