python-semantic-release 9.13.0__tar.gz → 9.14.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. {python_semantic_release-9.13.0/src/python_semantic_release.egg-info → python_semantic_release-9.14.0}/PKG-INFO +2 -2
  2. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/automatic-releases/github-actions.rst +5 -5
  3. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/changelog_templates.rst +20 -0
  4. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/configuration.rst +30 -0
  5. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/index.rst +2 -2
  6. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/pyproject.toml +2 -2
  7. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0/src/python_semantic_release.egg-info}/PKG-INFO +2 -2
  8. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/python_semantic_release.egg-info/SOURCES.txt +3 -0
  9. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/python_semantic_release.egg-info/requires.txt +1 -1
  10. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/__init__.py +1 -1
  11. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/changelog/context.py +9 -0
  12. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/changelog_writer.py +5 -4
  13. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/commands/changelog.py +1 -0
  14. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/commands/version.py +1 -0
  15. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/config.py +4 -0
  16. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/md/.components/changelog_init.md.j2 +29 -0
  17. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/md/.components/changelog_update.md.j2 +16 -7
  18. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/md/.components/changes.md.j2 +3 -3
  19. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/md/.components/first_release.md.j2 +11 -0
  20. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/md/.components/macros.md.j2 +28 -7
  21. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/md/.release_notes.md.j2 +13 -0
  22. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/md/CHANGELOG.md.j2 +0 -4
  23. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2 +29 -0
  24. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/rst/.components/changelog_update.rst.j2 +16 -7
  25. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/rst/.components/changes.rst.j2 +3 -3
  26. python_semantic_release-9.14.0/src/semantic_release/data/templates/angular/rst/.components/first_release.rst.j2 +20 -0
  27. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/rst/.components/macros.rst.j2 +16 -4
  28. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/rst/CHANGELOG.rst.j2 +1 -4
  29. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_changelog/test_changelog.py +65 -0
  30. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_print.py +11 -11
  31. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/git_repo.py +96 -13
  32. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +18 -0
  33. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +20 -0
  34. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/repos/github_flow/repo_w_default_release.py +8 -0
  35. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +14 -0
  36. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/repos/repo_initial_commit.py +4 -0
  37. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +4 -0
  38. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +10 -0
  39. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +6 -0
  40. python_semantic_release-9.14.0/tests/unit/semantic_release/changelog/conftest.py +114 -0
  41. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/changelog/test_changelog_context.py +8 -0
  42. python_semantic_release-9.14.0/tests/unit/semantic_release/changelog/test_default_changelog.py +248 -0
  43. python_semantic_release-9.14.0/tests/unit/semantic_release/changelog/test_release_notes.py +188 -0
  44. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/util.py +1 -0
  45. python_semantic_release-9.13.0/src/semantic_release/data/templates/angular/md/.components/changelog_init.md.j2 +0 -22
  46. python_semantic_release-9.13.0/src/semantic_release/data/templates/angular/md/.release_notes.md.j2 +0 -1
  47. python_semantic_release-9.13.0/src/semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2 +0 -22
  48. python_semantic_release-9.13.0/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -225
  49. python_semantic_release-9.13.0/tests/unit/semantic_release/changelog/test_release_notes.py +0 -118
  50. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/AUTHORS.rst +0 -0
  51. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/LICENSE +0 -0
  52. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/MANIFEST.in +0 -0
  53. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/README.rst +0 -0
  54. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/Makefile +0 -0
  55. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/algorithm.rst +0 -0
  56. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/automatic-releases/cronjobs.rst +0 -0
  57. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/automatic-releases/index.rst +0 -0
  58. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/automatic-releases/travis.rst +0 -0
  59. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/commands.rst +0 -0
  60. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/commit-parsing.rst +0 -0
  61. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/conf.py +0 -0
  62. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/contributing.rst +0 -0
  63. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/contributors.rst +0 -0
  64. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/make.bat +0 -0
  65. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/migrating_from_v7.rst +0 -0
  66. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/multibranch_releases.rst +0 -0
  67. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/strict_mode.rst +0 -0
  68. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/docs/troubleshooting.rst +0 -0
  69. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/setup.cfg +0 -0
  70. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/python_semantic_release.egg-info/dependency_links.txt +0 -0
  71. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/python_semantic_release.egg-info/entry_points.txt +0 -0
  72. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/python_semantic_release.egg-info/top_level.txt +0 -0
  73. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/__main__.py +0 -0
  74. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/changelog/__init__.py +0 -0
  75. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/changelog/release_history.py +0 -0
  76. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/changelog/template.py +0 -0
  77. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/__init__.py +0 -0
  78. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/cli_context.py +0 -0
  79. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/commands/__init__.py +0 -0
  80. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/commands/generate_config.py +0 -0
  81. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/commands/main.py +0 -0
  82. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/commands/publish.py +0 -0
  83. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/const.py +0 -0
  84. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/github_actions_output.py +0 -0
  85. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/masking_filter.py +0 -0
  86. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/cli/util.py +0 -0
  87. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/commit_parser/__init__.py +0 -0
  88. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/commit_parser/_base.py +0 -0
  89. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/commit_parser/angular.py +0 -0
  90. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/commit_parser/emoji.py +0 -0
  91. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/commit_parser/scipy.py +0 -0
  92. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/commit_parser/tag.py +0 -0
  93. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/commit_parser/token.py +0 -0
  94. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/commit_parser/util.py +0 -0
  95. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/const.py +0 -0
  96. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/md/.components/changelog_header.md.j2 +0 -0
  97. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/md/.components/unreleased_changes.md.j2 +0 -0
  98. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2 +0 -0
  99. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/rst/.components/changelog_header.rst.j2 +0 -0
  100. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j2 +0 -0
  101. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2 +0 -0
  102. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/enums.py +0 -0
  103. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/errors.py +0 -0
  104. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/gitproject.py +0 -0
  105. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/globals.py +0 -0
  106. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/helpers.py +0 -0
  107. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/__init__.py +0 -0
  108. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/_base.py +0 -0
  109. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/bitbucket.py +0 -0
  110. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/gitea.py +0 -0
  111. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/github.py +0 -0
  112. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/gitlab.py +0 -0
  113. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/remote_hvcs_base.py +0 -0
  114. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/token_auth.py +0 -0
  115. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/hvcs/util.py +0 -0
  116. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/version/__init__.py +0 -0
  117. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/version/algorithm.py +0 -0
  118. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/version/declaration.py +0 -0
  119. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/version/translator.py +0 -0
  120. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/src/semantic_release/version/version.py +0 -0
  121. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/__init__.py +0 -0
  122. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/conftest.py +0 -0
  123. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/const.py +0 -0
  124. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/__init__.py +0 -0
  125. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_changelog/__init__.py +0 -0
  126. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_config/__init__.py +0 -0
  127. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_config/test_generate_config.py +0 -0
  128. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_publish/__init__.py +0 -0
  129. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_publish/test_publish.py +0 -0
  130. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/__init__.py +0 -0
  131. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version.py +0 -0
  132. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_build.py +0 -0
  133. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_bump.py +0 -0
  134. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_changelog.py +0 -0
  135. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_github_actions.py +0 -0
  136. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_release_notes.py +0 -0
  137. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_stamp.py +0 -0
  138. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/cmd_version/test_version_strict.py +0 -0
  139. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/conftest.py +0 -0
  140. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/test_help.py +0 -0
  141. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/e2e/test_main.py +0 -0
  142. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/__init__.py +0 -0
  143. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/commit_parsers.py +0 -0
  144. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/example_project.py +0 -0
  145. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/repos/__init__.py +0 -0
  146. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/repos/git_flow/__init__.py +0 -0
  147. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/repos/github_flow/__init__.py +0 -0
  148. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
  149. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/fixtures/scipy.py +0 -0
  150. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/__init__.py +0 -0
  151. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/conftest.py +0 -0
  152. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/__init__.py +0 -0
  153. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/changelog/__init__.py +0 -0
  154. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/changelog/test_release_history.py +0 -0
  155. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/changelog/test_template.py +0 -0
  156. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/changelog/test_template_render.py +0 -0
  157. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/cli/__init__.py +0 -0
  158. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/cli/test_config.py +0 -0
  159. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
  160. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
  161. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/cli/test_util.py +0 -0
  162. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/cli/test_version.py +0 -0
  163. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
  164. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/commit_parser/test_angular.py +0 -0
  165. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
  166. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
  167. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
  168. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
  169. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
  170. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
  171. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
  172. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
  173. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
  174. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
  175. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
  176. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
  177. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/test_helpers.py +0 -0
  178. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/version/__init__.py +0 -0
  179. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
  180. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/version/test_declaration.py +0 -0
  181. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/version/test_translator.py +0 -0
  182. {python_semantic_release-9.13.0 → python_semantic_release-9.14.0}/tests/unit/semantic_release/version/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.13.0
3
+ Version: 9.14.0
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -58,7 +58,7 @@ Requires-Dist: pre-commit~=3.5; extra == "dev"
58
58
  Requires-Dist: tox~=4.11; extra == "dev"
59
59
  Requires-Dist: ruff==0.6.1; extra == "dev"
60
60
  Provides-Extra: mypy
61
- Requires-Dist: mypy==1.11.2; extra == "mypy"
61
+ Requires-Dist: mypy==1.13.0; extra == "mypy"
62
62
  Requires-Dist: types-requests~=2.32.0; extra == "mypy"
63
63
 
64
64
  Python Semantic Release
@@ -337,7 +337,7 @@ before the :ref:`version <cmd-version>` subcommand.
337
337
 
338
338
  .. code:: yaml
339
339
 
340
- - uses: python-semantic-release/python-semantic-release@v9.13.0
340
+ - uses: python-semantic-release/python-semantic-release@v9.14.0
341
341
  with:
342
342
  root_options: "-vv --noop"
343
343
 
@@ -684,7 +684,7 @@ to the GitHub Release Assets as well.
684
684
  - name: Action | Semantic Version Release
685
685
  id: release
686
686
  # Adjust tag with desired version if applicable.
687
- uses: python-semantic-release/python-semantic-release@v9.13.0
687
+ uses: python-semantic-release/python-semantic-release@v9.14.0
688
688
  with:
689
689
  github_token: ${{ secrets.GITHUB_TOKEN }}
690
690
  git_committer_name: "github-actions"
@@ -744,7 +744,7 @@ The equivalent GitHub Action configuration would be:
744
744
 
745
745
  - name: Action | Semantic Version Release
746
746
  # Adjust tag with desired version if applicable.
747
- uses: python-semantic-release/python-semantic-release@v9.13.0
747
+ uses: python-semantic-release/python-semantic-release@v9.14.0
748
748
  with:
749
749
  github_token: ${{ secrets.GITHUB_TOKEN }}
750
750
  force: patch
@@ -772,13 +772,13 @@ Publish Action.
772
772
  .. code:: yaml
773
773
 
774
774
  - name: Release Project 1
775
- uses: python-semantic-release/python-semantic-release@v9.13.0
775
+ uses: python-semantic-release/python-semantic-release@v9.14.0
776
776
  with:
777
777
  directory: ./project1
778
778
  github_token: ${{ secrets.GITHUB_TOKEN }}
779
779
 
780
780
  - name: Release Project 2
781
- uses: python-semantic-release/python-semantic-release@v9.13.0
781
+ uses: python-semantic-release/python-semantic-release@v9.14.0
782
782
  with:
783
783
  directory: ./project2
784
784
  github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -470,6 +470,26 @@ the ``context`` object has the following attributes:
470
470
  #}{% endif
471
471
  %}
472
472
 
473
+ * ``mask_initial_release (bool)``: a boolean value indicating whether the initial release
474
+ should be masked with a generic message. This value is passed directly from the
475
+ :ref:`changelog.default_templates.mask_initial_release <config-changelog-default_templates-mask_initial_release>`
476
+ configuration setting.
477
+
478
+ *Introduced in v9.14.0.*
479
+
480
+ **Example Usage:**
481
+
482
+ .. code:: jinja
483
+
484
+ #}{% if releases | length == 1 and ctx.mask_initial_release
485
+ %}{# # On a first release, generate a generic message
486
+ #}{% include ".components/first_release.md.j2"
487
+ %}{% else
488
+ %}{# # Not the first release
489
+ #}{% include ".components/versioned_changes.md.j2"
490
+ %}{% endif
491
+ %}
492
+
473
493
  * ``repo_name (str)``: the name of the current repository parsed from the Git url.
474
494
 
475
495
  **Example Usage:**
@@ -362,6 +362,36 @@ this setting is not used. See :ref:`config-changelog-template_dir` for more info
362
362
 
363
363
  ----
364
364
 
365
+ .. _config-changelog-default_templates-mask_initial_release:
366
+
367
+ ``mask_initial_release``
368
+ '''''''''''''''''''''''
369
+
370
+ *Introduced in v9.14.0*
371
+
372
+ **Type:** ``bool``
373
+
374
+ This option toggles the behavior of the changelog and release note templates to mask
375
+ the release details specifically for the first release. When set to ``true``, the
376
+ first version release notes will be masked with a generic message as opposed to the
377
+ usual commit details. When set to ``false``, the release notes will be generated as
378
+ normal.
379
+
380
+ The reason for this setting is to improve clarity to your audience. It conceptually
381
+ does **NOT** make sense to have a list of changes (i.e. a Changelog) for the first release
382
+ since nothing has been published yet, therefore in the eyes of your consumers what change
383
+ is there to document?
384
+
385
+ The message details can be found in the ``first_release.md.j2`` and ``first_release.rst.j2``
386
+ templates of the default changelog template directory.
387
+
388
+ **Default:** ``false``
389
+
390
+ .. seealso::
391
+ - :ref:`changelog-templates-default_changelog`
392
+
393
+ ----
394
+
365
395
  .. _config-changelog-default_templates-output_format:
366
396
 
367
397
  ``output_format``
@@ -30,8 +30,8 @@ Read more about the setup and configuration in our `getting started guide`_.
30
30
  .. _GitHub Action: https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html
31
31
  .. _conda-forge: https://anaconda.org/conda-forge/python-semantic-release
32
32
 
33
- .. |Test Status| image:: https://img.shields.io/github/actions/workflow/status/python-semantic-release/python-semantic-release/main.yml?branch=master&label=Test%20Status&logo=github
34
- :target: https://github.com/python-semantic-release/python-semantic-release/actions/workflows/main.yml
33
+ .. |Test Status| image:: https://img.shields.io/github/actions/workflow/status/python-semantic-release/python-semantic-release/cicd.yml?branch=master&label=Test%20Status&logo=github
34
+ :target: https://github.com/python-semantic-release/python-semantic-release/actions/workflows/cicd.yml
35
35
  :alt: test-status
36
36
  .. |PyPI Version| image:: https://img.shields.io/pypi/v/python-semantic-release?label=PyPI&logo=pypi
37
37
  :target: https://pypi.org/project/python-semantic-release/
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "python-semantic-release"
9
- version = "9.13.0"
9
+ version = "9.14.0"
10
10
  description = "Automatic Semantic Versioning for Python projects"
11
11
  requires-python = ">=3.8"
12
12
  license = { text = "MIT" }
@@ -78,7 +78,7 @@ dev = [
78
78
  "ruff == 0.6.1"
79
79
  ]
80
80
  mypy = [
81
- "mypy == 1.11.2",
81
+ "mypy == 1.13.0",
82
82
  "types-requests ~= 2.32.0",
83
83
  ]
84
84
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.13.0
3
+ Version: 9.14.0
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -58,7 +58,7 @@ Requires-Dist: pre-commit~=3.5; extra == "dev"
58
58
  Requires-Dist: tox~=4.11; extra == "dev"
59
59
  Requires-Dist: ruff==0.6.1; extra == "dev"
60
60
  Provides-Extra: mypy
61
- Requires-Dist: mypy==1.11.2; extra == "mypy"
61
+ Requires-Dist: mypy==1.13.0; extra == "mypy"
62
62
  Requires-Dist: types-requests~=2.32.0; extra == "mypy"
63
63
 
64
64
  Python Semantic Release
@@ -68,6 +68,7 @@ src/semantic_release/data/templates/angular/md/.components/changelog_header.md.j
68
68
  src/semantic_release/data/templates/angular/md/.components/changelog_init.md.j2
69
69
  src/semantic_release/data/templates/angular/md/.components/changelog_update.md.j2
70
70
  src/semantic_release/data/templates/angular/md/.components/changes.md.j2
71
+ src/semantic_release/data/templates/angular/md/.components/first_release.md.j2
71
72
  src/semantic_release/data/templates/angular/md/.components/macros.md.j2
72
73
  src/semantic_release/data/templates/angular/md/.components/unreleased_changes.md.j2
73
74
  src/semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2
@@ -76,6 +77,7 @@ src/semantic_release/data/templates/angular/rst/.components/changelog_header.rst
76
77
  src/semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2
77
78
  src/semantic_release/data/templates/angular/rst/.components/changelog_update.rst.j2
78
79
  src/semantic_release/data/templates/angular/rst/.components/changes.rst.j2
80
+ src/semantic_release/data/templates/angular/rst/.components/first_release.rst.j2
79
81
  src/semantic_release/data/templates/angular/rst/.components/macros.rst.j2
80
82
  src/semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j2
81
83
  src/semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2
@@ -139,6 +141,7 @@ tests/unit/conftest.py
139
141
  tests/unit/semantic_release/__init__.py
140
142
  tests/unit/semantic_release/test_helpers.py
141
143
  tests/unit/semantic_release/changelog/__init__.py
144
+ tests/unit/semantic_release/changelog/conftest.py
142
145
  tests/unit/semantic_release/changelog/test_changelog_context.py
143
146
  tests/unit/semantic_release/changelog/test_default_changelog.py
144
147
  tests/unit/semantic_release/changelog/test_release_history.py
@@ -26,7 +26,7 @@ sphinx-autobuild==2024.2.4
26
26
  furo~=2024.1
27
27
 
28
28
  [mypy]
29
- mypy==1.11.2
29
+ mypy==1.13.0
30
30
  types-requests~=2.32.0
31
31
 
32
32
  [test]
@@ -24,7 +24,7 @@ from semantic_release.version import (
24
24
  tags_and_versions,
25
25
  )
26
26
 
27
- __version__ = "9.13.0"
27
+ __version__ = "9.14.0"
28
28
 
29
29
  __all__ = [
30
30
  "CommitParser",
@@ -23,6 +23,7 @@ class ReleaseNotesContext:
23
23
  hvcs_type: str
24
24
  version: Version
25
25
  release: Release
26
+ mask_initial_release: bool
26
27
  filters: tuple[Callable[..., Any], ...] = ()
27
28
 
28
29
  def bind_to_environment(self, env: Environment) -> Environment:
@@ -53,6 +54,7 @@ class ChangelogContext:
53
54
  changelog_mode: Literal["update", "init"]
54
55
  prev_changelog_file: str
55
56
  changelog_insertion_flag: str
57
+ mask_initial_release: bool
56
58
  filters: tuple[Callable[..., Any], ...] = ()
57
59
 
58
60
  def bind_to_environment(self, env: Environment) -> Environment:
@@ -69,6 +71,7 @@ def make_changelog_context(
69
71
  mode: ChangelogMode,
70
72
  prev_changelog_file: Path,
71
73
  insertion_flag: str,
74
+ mask_initial_release: bool,
72
75
  ) -> ChangelogContext:
73
76
  return ChangelogContext(
74
77
  repo_name=hvcs_client.repo_name,
@@ -76,6 +79,7 @@ def make_changelog_context(
76
79
  history=release_history,
77
80
  changelog_mode=mode.value,
78
81
  changelog_insertion_flag=insertion_flag,
82
+ mask_initial_release=mask_initial_release,
79
83
  prev_changelog_file=str(prev_changelog_file),
80
84
  hvcs_type=hvcs_client.__class__.__name__.lower(),
81
85
  filters=(
@@ -111,6 +115,11 @@ def convert_md_to_rst(md_content: str) -> str:
111
115
  "bullets": (regexp(r"^(\s*)-(\s)"), r"\1*\2"),
112
116
  # Replace markdown inline raw content with rst inline raw content
113
117
  "raw-inline": (regexp(r"(?<=\s)(`[^`]+`)(?![`_])"), r"`\1`"),
118
+ # Replace markdown inline link with rst inline link
119
+ "link-inline": (
120
+ regexp(r"(?<=\s)\[([^\]]+)\]\(([^)]+)\)(?=\s|$)"),
121
+ r"`\1 <\2>`_",
122
+ ),
114
123
  }
115
124
 
116
125
  for pattern, replacement in replacements.values():
@@ -178,6 +178,7 @@ def write_changelog_files(
178
178
  mode=runtime_ctx.changelog_mode,
179
179
  insertion_flag=runtime_ctx.changelog_insertion_flag,
180
180
  prev_changelog_file=runtime_ctx.changelog_file,
181
+ mask_initial_release=runtime_ctx.changelog_mask_initial_release,
181
182
  )
182
183
 
183
184
  user_templates = []
@@ -226,6 +227,7 @@ def generate_release_notes(
226
227
  template_dir: Path,
227
228
  history: ReleaseHistory,
228
229
  style: str,
230
+ mask_initial_release: bool,
229
231
  ) -> str:
230
232
  users_tpl_file = template_dir / DEFAULT_RELEASE_NOTES_TPL_FILE
231
233
 
@@ -251,6 +253,7 @@ def generate_release_notes(
251
253
  hvcs_type=hvcs_client.__class__.__name__.lower(),
252
254
  version=release["version"],
253
255
  release=release,
256
+ mask_initial_release=mask_initial_release,
254
257
  filters=(*hvcs_client.get_changelog_context_filters(), autofit_text_width),
255
258
  ).bind_to_environment(
256
259
  # Use a new, non-configurable environment for release notes -
@@ -259,11 +262,9 @@ def generate_release_notes(
259
262
  )
260
263
 
261
264
  # TODO: Remove in v10
262
- release_notes_env.globals["context"] = {
263
- "history": history,
264
- }
265
- release_notes_env.globals["ctx"] = {
265
+ release_notes_env.globals["context"] = release_notes_env.globals["ctx"] = {
266
266
  "history": history,
267
+ "mask_initial_release": mask_initial_release,
267
268
  }
268
269
 
269
270
  return render_release_notes(
@@ -119,6 +119,7 @@ def changelog(cli_ctx: CliContextObj, release_tag: str | None) -> None:
119
119
  runtime.template_dir,
120
120
  release_history,
121
121
  style=runtime.changelog_style,
122
+ mask_initial_release=runtime.changelog_mask_initial_release,
122
123
  )
123
124
 
124
125
  try:
@@ -696,6 +696,7 @@ def version( # noqa: C901
696
696
  runtime.template_dir,
697
697
  history=release_history,
698
698
  style=runtime.changelog_style,
699
+ mask_initial_release=runtime.changelog_mask_initial_release,
699
700
  )
700
701
 
701
702
  exception: Exception | None = None
@@ -123,6 +123,8 @@ class ChangelogEnvironmentConfig(BaseModel):
123
123
  class DefaultChangelogTemplatesConfig(BaseModel):
124
124
  changelog_file: str = "CHANGELOG.md"
125
125
  output_format: ChangelogOutputFormat = ChangelogOutputFormat.NONE
126
+ # TODO: Breaking Change v10, it will become True
127
+ mask_initial_release: bool = False
126
128
 
127
129
  @model_validator(mode="after")
128
130
  def interpret_output_format(self) -> Self:
@@ -511,6 +513,7 @@ class RuntimeContext:
511
513
  version_declarations: Tuple[VersionDeclarationABC, ...]
512
514
  hvcs_client: hvcs.HvcsBase
513
515
  changelog_insertion_flag: str
516
+ changelog_mask_initial_release: bool
514
517
  changelog_mode: ChangelogMode
515
518
  changelog_file: Path
516
519
  changelog_style: str
@@ -795,6 +798,7 @@ class RuntimeContext:
795
798
  hvcs_client=hvcs_client,
796
799
  changelog_file=changelog_file,
797
800
  changelog_mode=raw.changelog.mode,
801
+ changelog_mask_initial_release=raw.changelog.default_templates.mask_initial_release,
798
802
  changelog_insertion_flag=raw.changelog.insertion_flag,
799
803
  assets=raw.assets,
800
804
  commit_author=commit_author,
@@ -0,0 +1,29 @@
1
+ {#
2
+ This changelog template initializes a full changelog for the project,
3
+ it follows the following logic:
4
+ 1. Header
5
+ 2. Any Unreleased Details (uncommon)
6
+ 3. all previous releases except the very first release
7
+ 4. the first release
8
+
9
+ #}{#
10
+ # Header
11
+ #}{% include "changelog_header.md.j2"
12
+ -%}{#
13
+ # Any Unreleased Details (uncommon)
14
+ #}{% include "unreleased_changes.md.j2"
15
+ -%}{#
16
+ # Since this is initialization, we are generating all the previous
17
+ # release notes per version. The very first release notes is specialized
18
+ #}{% if releases | length > 0
19
+ %}{% for release in releases
20
+ %}{{ "\n"
21
+ }}{% if loop.last and ctx.mask_initial_release
22
+ %}{%- include "first_release.md.j2"
23
+ -%}{% else
24
+ %}{%- include "versioned_changes.md.j2"
25
+ -%}{% endif
26
+ %}{{ "\n"
27
+ }}{% endfor
28
+ %}{% endif
29
+ %}
@@ -41,15 +41,24 @@ This Update changelog template uses the following logic:
41
41
  # Any Unreleased Details (uncommon)
42
42
  #}{% include "unreleased_changes.md.j2"
43
43
  -%}{#
44
- # Latest Release Details
45
- #}{% for release in new_releases
46
- %}{# # Check if the release version is already in the changelog and if not, add it
47
- #}{% if "# " ~ release.version.as_semver_tag() ~ " " not in changelog_parts[1]
48
- %}{{ "\n"
44
+ #}{% if releases | length > 0
45
+ %}{# # Latest Release Details
46
+ #}{% set release = releases[0]
47
+ %}{#
48
+ #}{% if releases | length == 1 and ctx.mask_initial_release
49
+ %}{# # First Release detected
50
+ #}{{ "\n"
51
+ }}{%- include "first_release.md.j2"
52
+ -%}{{ "\n"
53
+ }}{#
54
+ #}{% elif "# " ~ release.version.as_semver_tag() ~ " " not in changelog_parts[1]
55
+ %}{# # The release version is not already in the changelog so we add it
56
+ #}{{ "\n"
49
57
  }}{%- include "versioned_changes.md.j2"
50
58
  -%}{{ "\n"
51
- }}{% endif
52
- %}{% endfor
59
+ }}{#
60
+ #}{% endif
61
+ %}{% endif
53
62
  %}{#
54
63
  # Previous Changelog Footer
55
64
  # - skips printing footer if empty, which happens when the insertion_flag
@@ -7,15 +7,15 @@ EXAMPLE:
7
7
  - Add new feature ([#10](https://domain.com/namespace/repo/pull/10),
8
8
  [`abcdef0`](https://domain.com/namespace/repo/commit/HASH))
9
9
 
10
- - Add new feature ([`abcdef0`](https://domain.com/namespace/repo/commit/HASH))
10
+ - **scope**: Add new feature ([`abcdef0`](https://domain.com/namespace/repo/commit/HASH))
11
11
 
12
12
  ### Fixes
13
13
 
14
14
  - Fix bug ([#11](https://domain.com/namespace/repo/pull/11),
15
15
  [`abcdef1`](https://domain.com/namespace/repo/commit/HASH))
16
16
 
17
- #}{% set max_line_width = 100
18
- %}{% set hanging_indent = 2
17
+ #}{% set max_line_width = max_line_width | default(100)
18
+ %}{% set hanging_indent = hanging_indent | default(2)
19
19
  %}{#
20
20
  #}{% for type_, commits in commit_objects if type_ != "unknown"
21
21
  %}{# PREPROCESS COMMITS (order by description & format description line)
@@ -0,0 +1,11 @@
1
+ {#
2
+
3
+ ## vX.X.X (YYYY-MMM-DD)
4
+
5
+ #}{{
6
+ "## %s (%s)" | format(
7
+ release.version.as_semver_tag(),
8
+ release.tagged_date.strftime("%Y-%m-%d")
9
+ )}}
10
+
11
+ - Initial Release
@@ -1,9 +1,18 @@
1
+ {#
2
+ MACRO: format a inline link reference in Markdown
3
+ #}{% macro format_link(link, label)
4
+ %}{{ "[%s](%s)" | format(label, link)
5
+ }}{% endmacro
6
+ %}
7
+
8
+
1
9
  {#
2
10
  MACRO: commit message links or PR/MR links of commit
3
11
  #}{% macro commit_msg_links(commit)
4
12
  %}{% if commit.error is undefined
5
- %}{% set commit_hash_link = "[`%s`](%s)" | format(
6
- commit.short_hash, commit.hexsha | commit_hash_url
13
+ %}{% set commit_hash_link = format_link(
14
+ commit.hexsha | commit_hash_url,
15
+ "`%s`" | format(commit.short_hash)
7
16
  )
8
17
  %}{#
9
18
  #}{% set summary_line = commit.descriptions[0] | safe
@@ -15,7 +24,7 @@
15
24
  #}{% if commit.linked_merge_request != ""
16
25
  %}{# # Add PR references with a link to the PR
17
26
  #}{% set pr_num = commit.linked_merge_request
18
- %}{% set pr_link = "[%s](%s)" | format(pr_num, pr_num | pull_request_url)
27
+ %}{% set pr_link = format_link(pr_num | pull_request_url, pr_num)
19
28
  %}{#
20
29
  # TODO: breaking change v10, remove summary line replacers as PSR will do it for us
21
30
  #}{% set summary_line = summary_line | replace("(pull request", "(") | replace("(" ~ pr_num ~ ")", "") | trim
@@ -39,10 +48,22 @@
39
48
  {#
40
49
  MACRO: format commit summary line
41
50
  #}{% macro format_commit_summary_line(commit)
42
- %}{% if commit.error is undefined
43
- %}{{ commit_msg_links(commit)
44
- }}{% else
45
- %}{{ (commit.commit.message | string).split("\n", maxsplit=1)[0]
51
+ %}{# # Check for Parsing Error
52
+ #}{% if commit.error is undefined
53
+ %}{#
54
+ # # Add any message links to the commit summary line
55
+ #}{% set summary_line = commit_msg_links(commit)
56
+ %}{#
57
+ #}{% if commit.scope
58
+ %}{% set summary_line = "**%s**: %s" | format(commit.scope, summary_line)
59
+ %}{% endif
60
+ %}{#
61
+ # # Return the modified summary_line
62
+ #}{{ summary_line
63
+ }}{#
64
+ #}{% else
65
+ %}{# # Return the first line of the commit if there was a Parsing Error
66
+ #}{{ (commit.commit.message | string).split("\n", maxsplit=1)[0]
46
67
  }}{% endif
47
68
  %}{% endmacro
48
69
  %}
@@ -0,0 +1,13 @@
1
+ {# # Set line width to 1000 to avoid wrapping as GitHub will handle it
2
+ #}{% set max_line_width = max_line_width | default(1000)
3
+ %}{% set hanging_indent = hanging_indent | default(2)
4
+ %}{% set releases = context.history.released.items() | list
5
+ %}{#
6
+ #}{% if releases | length == 1 and mask_initial_release
7
+ %}{# # On a first release, generate our special message
8
+ #}{% include ".components/first_release.md.j2"
9
+ %}{% else
10
+ %}{# # Not the first release so generate notes normally
11
+ #}{% include ".components/versioned_changes.md.j2"
12
+ %}{% endif
13
+ %}
@@ -15,10 +15,6 @@
15
15
  %}{#
16
16
  #}{% elif ctx.changelog_mode == "update"
17
17
  %}{% set prev_changelog_file = ctx.prev_changelog_file
18
- %}{% set new_releases = []
19
- %}{% if releases | length > 0
20
- %}{% set new_releases = [releases | first]
21
- %}{% endif
22
18
  %}{% include ".components/changelog_update.md.j2"
23
19
  %}{#
24
20
  #}{% endif
@@ -0,0 +1,29 @@
1
+ {#
2
+ This changelog template initializes a full changelog for the project,
3
+ it follows the following logic:
4
+ 1. Header
5
+ 2. Any Unreleased Details (uncommon)
6
+ 3. all previous releases except the very first release
7
+ 4. the first release
8
+
9
+ #}{#
10
+ # Header
11
+ #}{% include "changelog_header.rst.j2"
12
+ -%}{#
13
+ # Any Unreleased Details (uncommon)
14
+ #}{% include "unreleased_changes.rst.j2"
15
+ -%}{#
16
+ # Since this is initialization, we are generating all the previous
17
+ # release notes per version. The very first release notes is specialized
18
+ #}{% if releases | length > 0
19
+ %}{% for release in releases
20
+ %}{{ "\n"
21
+ }}{% if loop.last and ctx.mask_initial_release
22
+ %}{%- include "first_release.rst.j2"
23
+ -%}{% else
24
+ %}{%- include "versioned_changes.rst.j2"
25
+ -%}{% endif
26
+ %}{{ "\n"
27
+ }}{% endfor
28
+ %}{% endif
29
+ %}
@@ -41,15 +41,24 @@ This Update changelog template uses the following logic:
41
41
  # Any Unreleased Details (uncommon)
42
42
  #}{% include "unreleased_changes.rst.j2"
43
43
  -%}{#
44
- # Latest Release Details
45
- #}{% for release in new_releases
46
- %}{# # Check if the release version is already in the changelog and if not, add it
47
- #}{% if release.version.as_semver_tag() ~ " (" not in changelog_parts[1]
48
- %}{{ "\n"
44
+ #}{% if releases | length > 0
45
+ %}{# # Latest Release Details
46
+ #}{% set release = releases[0]
47
+ %}{#
48
+ #}{% if releases | length == 1 and ctx.mask_initial_release
49
+ %}{# # First Release detected
50
+ #}{{ "\n"
51
+ }}{%- include "first_release.rst.j2"
52
+ -%}{{ "\n"
53
+ }}{#
54
+ #}{% elif release.version.as_semver_tag() ~ " (" not in changelog_parts[1]
55
+ %}{# # The release version is not already in the changelog so we add it
56
+ #}{{ "\n"
49
57
  }}{%- include "versioned_changes.rst.j2"
50
58
  -%}{{ "\n"
51
- }}{% endif
52
- %}{% endfor
59
+ }}{#
60
+ #}{% endif
61
+ %}{% endif
53
62
  %}{#
54
63
  # Previous Changelog Footer
55
64
  # - skips printing footer if empty, which happens when the insertion_flag
@@ -7,7 +7,7 @@ Features
7
7
 
8
8
  * Add new feature (`#10`_, `8a7b8ec`_)
9
9
 
10
- * Add another feature (`abcdef0`_)
10
+ * **scope**: Add another feature (`abcdef0`_)
11
11
 
12
12
  Fixes
13
13
  -----
@@ -19,8 +19,8 @@ Fixes
19
19
  .. _abcdef0: https://domain.com/owner/repo/commit/abcdef0
20
20
  .. _11: https://domain.com/namespace/repo/pull/11
21
21
 
22
- #}{% set max_line_width = 100
23
- %}{% set hanging_indent = 2
22
+ #}{% set max_line_width = max_line_width | default(100)
23
+ %}{% set hanging_indent = hanging_indent | default(2)
24
24
  %}{#
25
25
  #}{% set post_paragraph_links = []
26
26
  %}{#
@@ -0,0 +1,20 @@
1
+ {% from "macros.rst.j2" import generate_heading_underline
2
+ %}{#
3
+
4
+ .. _changelog-vX.X.X:
5
+
6
+ vX.X.X (YYYY-MMM-DD)
7
+ ====================
8
+
9
+ #}{% set version_header = "%s (%s)" | format(
10
+ release.version.as_semver_tag(),
11
+ release.tagged_date.strftime("%Y-%m-%d")
12
+ )
13
+ %}
14
+
15
+ {{- ".. _changelog-%s:" | format(release.version.as_semver_tag()) }}
16
+
17
+ {{ version_header }}
18
+ {{ generate_heading_underline(version_header, "=") }}
19
+
20
+ * Initial Release
@@ -9,10 +9,22 @@
9
9
  {#
10
10
  MACRO: format commit summary line
11
11
  #}{% macro format_commit_summary_line(commit)
12
- %}{% if commit.error is undefined
13
- %}{{ commit_msg_links(commit)
14
- }}{% else
15
- %}{{ (commit.commit.message | string).split("\n", maxsplit=1)[0]
12
+ %}{# # Check for Parsing Error
13
+ #}{% if commit.error is undefined
14
+ %}{#
15
+ # # Add any message links to the commit summary line
16
+ #}{% set summary_line = commit_msg_links(commit)
17
+ %}{#
18
+ #}{% if commit.scope
19
+ %}{% set summary_line = "**%s**: %s" | format(commit.scope, summary_line)
20
+ %}{% endif
21
+ %}{#
22
+ # # Return the modified summary_line
23
+ #}{{ summary_line
24
+ }}{#
25
+ #}{% else
26
+ %}{# # Return the first line of the commit if there was a Parsing Error
27
+ #}{{ (commit.commit.message | string).split("\n", maxsplit=1)[0]
16
28
  }}{% endif
17
29
  %}{% endmacro
18
30
  %}