python-semantic-release 9.16.1__tar.gz → 9.17.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 (203) hide show
  1. {python_semantic_release-9.16.1/src/python_semantic_release.egg-info → python_semantic_release-9.17.0}/PKG-INFO +1 -1
  2. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/automatic-releases/github-actions.rst +7 -7
  3. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/changelog_templates.rst +26 -0
  4. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/commit_parsing.rst +87 -20
  5. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/configuration.rst +5 -57
  6. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/pyproject.toml +1 -1
  7. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0/src/python_semantic_release.egg-info}/PKG-INFO +1 -1
  8. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/__init__.py +1 -1
  9. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/changelog/context.py +3 -0
  10. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/changelog/release_history.py +66 -56
  11. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/changelog/template.py +0 -1
  12. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/changelog_writer.py +6 -1
  13. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/commands/version.py +1 -1
  14. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/config.py +6 -1
  15. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/masking_filter.py +1 -1
  16. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/commit_parser/_base.py +1 -1
  17. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/commit_parser/angular.py +214 -15
  18. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/commit_parser/emoji.py +211 -23
  19. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/commit_parser/scipy.py +7 -7
  20. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/commit_parser/tag.py +3 -1
  21. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/commit_parser/util.py +49 -5
  22. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/helpers.py +83 -2
  23. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/hvcs/_base.py +1 -1
  24. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/version/algorithm.py +18 -4
  25. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/conftest.py +14 -2
  26. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_changelog/test_changelog.py +6 -3
  27. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/git_repo.py +159 -6
  28. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/github_flow/repo_w_default_release.py +2 -1
  29. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/changelog/test_changelog_context.py +88 -0
  30. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/changelog/test_release_notes.py +97 -0
  31. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/cli/test_config.py +52 -2
  32. python_semantic_release-9.17.0/tests/unit/semantic_release/commit_parser/test_angular.py +1131 -0
  33. python_semantic_release-9.17.0/tests/unit/semantic_release/commit_parser/test_emoji.py +993 -0
  34. python_semantic_release-9.17.0/tests/unit/semantic_release/commit_parser/test_scipy.py +1031 -0
  35. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/hvcs/test__base.py +2 -5
  36. python_semantic_release-9.17.0/tests/unit/semantic_release/test_helpers.py +297 -0
  37. python_semantic_release-9.16.1/tests/unit/semantic_release/commit_parser/test_angular.py +0 -528
  38. python_semantic_release-9.16.1/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -420
  39. python_semantic_release-9.16.1/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -470
  40. python_semantic_release-9.16.1/tests/unit/semantic_release/test_helpers.py +0 -133
  41. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/AUTHORS.rst +0 -0
  42. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/LICENSE +0 -0
  43. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/MANIFEST.in +0 -0
  44. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/README.rst +0 -0
  45. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/Makefile +0 -0
  46. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/algorithm.rst +0 -0
  47. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/automatic-releases/cronjobs.rst +0 -0
  48. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/automatic-releases/index.rst +0 -0
  49. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/automatic-releases/travis.rst +0 -0
  50. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/commands.rst +0 -0
  51. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/conf.py +0 -0
  52. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/contributing.rst +0 -0
  53. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/contributors.rst +0 -0
  54. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/index.rst +0 -0
  55. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/make.bat +0 -0
  56. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/migrating_from_v7.rst +0 -0
  57. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/multibranch_releases.rst +0 -0
  58. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/strict_mode.rst +0 -0
  59. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/docs/troubleshooting.rst +0 -0
  60. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/setup.cfg +0 -0
  61. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/python_semantic_release.egg-info/SOURCES.txt +0 -0
  62. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/python_semantic_release.egg-info/dependency_links.txt +0 -0
  63. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/python_semantic_release.egg-info/entry_points.txt +0 -0
  64. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/python_semantic_release.egg-info/requires.txt +0 -0
  65. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/python_semantic_release.egg-info/top_level.txt +0 -0
  66. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/__main__.py +0 -0
  67. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/changelog/__init__.py +0 -0
  68. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/__init__.py +0 -0
  69. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/cli_context.py +0 -0
  70. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/commands/__init__.py +0 -0
  71. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/commands/changelog.py +0 -0
  72. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/commands/generate_config.py +0 -0
  73. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/commands/main.py +0 -0
  74. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/commands/publish.py +0 -0
  75. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/const.py +0 -0
  76. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/github_actions_output.py +0 -0
  77. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/cli/util.py +0 -0
  78. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/commit_parser/__init__.py +0 -0
  79. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/commit_parser/token.py +0 -0
  80. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/const.py +0 -0
  81. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/md/.components/changelog_header.md.j2 +0 -0
  82. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/md/.components/changelog_init.md.j2 +0 -0
  83. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/md/.components/changelog_update.md.j2 +0 -0
  84. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/md/.components/changes.md.j2 +0 -0
  85. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/md/.components/first_release.md.j2 +0 -0
  86. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/md/.components/macros.md.j2 +0 -0
  87. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/md/.components/unreleased_changes.md.j2 +0 -0
  88. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/md/.components/versioned_changes.md.j2 +0 -0
  89. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/md/.release_notes.md.j2 +0 -0
  90. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/md/CHANGELOG.md.j2 +0 -0
  91. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/rst/.components/changelog_header.rst.j2 +0 -0
  92. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/rst/.components/changelog_init.rst.j2 +0 -0
  93. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/rst/.components/changelog_update.rst.j2 +0 -0
  94. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/rst/.components/changes.rst.j2 +0 -0
  95. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/rst/.components/first_release.rst.j2 +0 -0
  96. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/rst/.components/macros.rst.j2 +0 -0
  97. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/rst/.components/unreleased_changes.rst.j2 +0 -0
  98. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/rst/.components/versioned_changes.rst.j2 +0 -0
  99. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/data/templates/angular/rst/CHANGELOG.rst.j2 +0 -0
  100. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/enums.py +0 -0
  101. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/errors.py +0 -0
  102. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/gitproject.py +0 -0
  103. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/globals.py +0 -0
  104. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/hvcs/__init__.py +0 -0
  105. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/hvcs/bitbucket.py +0 -0
  106. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/hvcs/gitea.py +0 -0
  107. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/hvcs/github.py +0 -0
  108. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/hvcs/gitlab.py +0 -0
  109. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/hvcs/remote_hvcs_base.py +0 -0
  110. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/hvcs/token_auth.py +0 -0
  111. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/hvcs/util.py +0 -0
  112. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/py.typed +0 -0
  113. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/version/__init__.py +0 -0
  114. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/version/declaration.py +0 -0
  115. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/version/translator.py +0 -0
  116. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/src/semantic_release/version/version.py +0 -0
  117. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/__init__.py +0 -0
  118. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/const.py +0 -0
  119. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/__init__.py +0 -0
  120. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_changelog/__init__.py +0 -0
  121. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_changelog/test_changelog_custom_parser.py +0 -0
  122. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_config/__init__.py +0 -0
  123. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_config/test_generate_config.py +0 -0
  124. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_publish/__init__.py +0 -0
  125. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_publish/test_publish.py +0 -0
  126. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/__init__.py +0 -0
  127. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/__init__.py +0 -0
  128. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/conftest.py +0 -0
  129. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/git_flow/__init__.py +0 -0
  130. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_1_channel.py +0 -0
  131. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_2_channels.py +0 -0
  132. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_3_channels.py +0 -0
  133. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/git_flow/test_repo_4_channels.py +0 -0
  134. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/github_flow/__init__.py +0 -0
  135. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_1_channel.py +0 -0
  136. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/github_flow/test_repo_2_channels.py +0 -0
  137. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/__init__.py +0 -0
  138. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk.py +0 -0
  139. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support.py +0 -0
  140. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_dual_version_support_w_prereleases.py +0 -0
  141. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/bump_version/trunk_based_dev/test_repo_trunk_w_prereleases.py +0 -0
  142. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/test_version.py +0 -0
  143. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/test_version_build.py +0 -0
  144. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/test_version_bump.py +0 -0
  145. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/test_version_changelog.py +0 -0
  146. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/test_version_changelog_custom_commit_msg.py +0 -0
  147. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/test_version_github_actions.py +0 -0
  148. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/test_version_print.py +0 -0
  149. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/test_version_release_notes.py +0 -0
  150. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/test_version_stamp.py +0 -0
  151. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/cmd_version/test_version_strict.py +0 -0
  152. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/conftest.py +0 -0
  153. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/test_help.py +0 -0
  154. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/e2e/test_main.py +0 -0
  155. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/__init__.py +0 -0
  156. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/commit_parsers.py +0 -0
  157. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/example_project.py +0 -0
  158. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/__init__.py +0 -0
  159. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/git_flow/__init__.py +0 -0
  160. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/git_flow/repo_w_1_release_channel.py +0 -0
  161. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +0 -0
  162. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +0 -0
  163. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/git_flow/repo_w_4_release_channels.py +0 -0
  164. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/github_flow/__init__.py +0 -0
  165. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +0 -0
  166. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/repo_initial_commit.py +0 -0
  167. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
  168. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support.py +0 -0
  169. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/trunk_based_dev/repo_w_dual_version_support_w_prereleases.py +0 -0
  170. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +0 -0
  171. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +0 -0
  172. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +0 -0
  173. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/fixtures/scipy.py +0 -0
  174. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/__init__.py +0 -0
  175. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/conftest.py +0 -0
  176. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/__init__.py +0 -0
  177. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/changelog/__init__.py +0 -0
  178. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/changelog/conftest.py +0 -0
  179. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
  180. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/changelog/test_release_history.py +0 -0
  181. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/changelog/test_template.py +0 -0
  182. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/changelog/test_template_render.py +0 -0
  183. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/cli/__init__.py +0 -0
  184. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
  185. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
  186. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/cli/test_util.py +0 -0
  187. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/cli/test_version.py +0 -0
  188. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
  189. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
  190. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
  191. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
  192. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
  193. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
  194. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
  195. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
  196. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
  197. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
  198. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/version/__init__.py +0 -0
  199. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
  200. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/version/test_declaration.py +0 -0
  201. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/version/test_translator.py +0 -0
  202. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/unit/semantic_release/version/test_version.py +0 -0
  203. {python_semantic_release-9.16.1 → python_semantic_release-9.17.0}/tests/util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.16.1
3
+ Version: 9.17.0
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -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.16.0
340
+ - uses: python-semantic-release/python-semantic-release@v9.16.1
341
341
  with:
342
342
  root_options: "-vv --noop"
343
343
 
@@ -576,7 +576,7 @@ before the :ref:`publish <cmd-publish>` subcommand.
576
576
 
577
577
  .. code:: yaml
578
578
 
579
- - uses: python-semantic-release/publish-action@v9.16.0
579
+ - uses: python-semantic-release/publish-action@v9.16.1
580
580
  with:
581
581
  root_options: "-vv --noop"
582
582
 
@@ -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.16.0
687
+ uses: python-semantic-release/python-semantic-release@v9.16.1
688
688
  with:
689
689
  github_token: ${{ secrets.GITHUB_TOKEN }}
690
690
  git_committer_name: "github-actions"
@@ -695,7 +695,7 @@ to the GitHub Release Assets as well.
695
695
  if: steps.release.outputs.released == 'true'
696
696
 
697
697
  - name: Publish | Upload to GitHub Release Assets
698
- uses: python-semantic-release/publish-action@v9.16.0
698
+ uses: python-semantic-release/publish-action@v9.16.1
699
699
  if: steps.release.outputs.released == 'true'
700
700
  with:
701
701
  github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -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.16.0
747
+ uses: python-semantic-release/python-semantic-release@v9.16.1
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.16.0
775
+ uses: python-semantic-release/python-semantic-release@v9.16.1
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.16.0
781
+ uses: python-semantic-release/python-semantic-release@v9.16.1
782
782
  with:
783
783
  directory: ./project2
784
784
  github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -831,6 +831,31 @@ The filters provided vary based on the VCS configured and available features:
831
831
  {% set prev_changelog_contents = prev_changelog_file | read_file | safe %}
832
832
 
833
833
 
834
+ * ``sort_numerically (Callable[[Iterable[str], bool], list[str]])``: given a
835
+ sequence of strings with possibly some non-number characters as a prefix or suffix,
836
+ sort the strings as if they were just numbers from lowest to highest. This filter
837
+ is useful when you want to sort issue numbers or other strings that have a numeric
838
+ component in them but cannot be cast to a number directly to sort them. If you want
839
+ to sort the strings in reverse order, you can pass a boolean value of ``True`` as the
840
+ second argument.
841
+
842
+ *Introduced in v9.16.0.*
843
+
844
+ **Example Usage:**
845
+
846
+ .. code:: jinja
847
+
848
+ {{ ["#222", "#1023", "#444"] | sort_numerically }}
849
+ {{ ["#222", "#1023", "#444"] | sort_numerically(True) }}
850
+
851
+ **Markdown Output:**
852
+
853
+ .. code:: markdown
854
+
855
+ ['#222', '#444', '#1023']
856
+ ['#1023', '#444', '#222']
857
+
858
+
834
859
  Availability of the documented filters can be found in the table below:
835
860
 
836
861
  ====================== ========= ===== ====== ======
@@ -846,6 +871,7 @@ issue_url ❌ ✅ ✅ ✅
846
871
  merge_request_url ❌ ❌ ❌ ✅
847
872
  pull_request_url ✅ ✅ ✅ ✅
848
873
  read_file ✅ ✅ ✅ ✅
874
+ sort_numerically ✅ ✅ ✅ ✅
849
875
  ====================== ========= ===== ====== ======
850
876
 
851
877
  .. seealso::
@@ -108,13 +108,13 @@ logic in relation to how PSR's core features:
108
108
  message. If no issue numbers are found, the parser will return an empty tuple. *Feature
109
109
  available in v9.15.0+.*
110
110
 
111
- **Limitations:**
111
+ - **Squash Commit Evaluation**: This parser implements PSR's
112
+ :ref:`commit_parser-builtin-squash_commit_evaluation` to identify and extract each commit
113
+ message as a separate commit message within a single squashed commit. You can toggle this
114
+ feature on/off via the :ref:`config-commit_parser_options` setting. *Feature available in
115
+ v9.17.0+.*
112
116
 
113
- - Squash commits are not currently supported. This means that the level bump for a squash
114
- commit is only determined by the subject line of the squash commit. Our default changelog
115
- template currently writes out the entire commit message body in the changelog in order to
116
- provide the full detail of the changes. Track the implementation of this feature with
117
- the issues `#733`_, `#1085`_, and `PR#1112`_.
117
+ **Limitations**:
118
118
 
119
119
  - Commits with the ``revert`` type are not currently supported. Track the implementation
120
120
  of this feature in the issue `#402`_.
@@ -179,6 +179,12 @@ how PSR's core features:
179
179
  enabled by setting the configuration option ``commit_parser_options.parse_linked_issues``
180
180
  to ``true``. *Feature available in v9.15.0+.*
181
181
 
182
+ - **Squash Commit Evaluation**: This parser implements PSR's
183
+ :ref:`commit_parser-builtin-squash_commit_evaluation` to identify and extract each commit
184
+ message as a separate commit message within a single squashed commit. You can toggle this
185
+ feature on/off via the :ref:`config-commit_parser_options` setting. *Feature available in
186
+ v9.17.0+.*
187
+
182
188
  If no commit parser options are provided via the configuration, the parser will use PSR's
183
189
  built-in :py:class:`defaults <semantic_release.commit_parser.emoji.EmojiParserOptions>`.
184
190
 
@@ -304,6 +310,72 @@ return an empty tuple.
304
310
 
305
311
  ----
306
312
 
313
+ .. _commit_parser-builtin-squash_commit_evaluation:
314
+
315
+ Common Squash Commit Evaluation
316
+ """""""""""""""""""""""""""""""
317
+
318
+ *Introduced in v9.17.0*
319
+
320
+ All of the PSR built-in parsers implement common squash commit evaluation logic to identify
321
+ and extract individual commit messages from a single squashed commit. The parsers will
322
+ look for common squash commit delimiters and multiple matches of the commit message
323
+ format to identify each individual commit message that was squashed. The parsers will
324
+ return a list containing each commit message as a separate commit object. Squashed commits
325
+ will be evaluated individually for both the level bump and changelog generation. If no
326
+ squash commits are found, a list with the single commit object will be returned.
327
+
328
+ Currently, PSR has been tested against GitHub, BitBucket, and official ``git`` squash
329
+ merge commmit messages. GitLab does not have a default template for squash commit messages
330
+ but can be customized per project or server. If you are using GitLab, you will need to
331
+ ensure that the squash commit message format is similar to the example below.
332
+
333
+ **Example**:
334
+
335
+ *The following example will extract three separate commit messages from a single GitHub
336
+ formatted squash commit message of conventional commit style:*
337
+
338
+ .. code-block:: text
339
+
340
+ feat(config): add new config option (#123)
341
+
342
+ * refactor(config): change the implementation of config loading
343
+
344
+ * docs(configuration): defined new config option for the project
345
+
346
+ When parsed with the default angular parser with squash commits toggled on, the version
347
+ bump will be determined by the highest level bump of the three commits (in this case, a
348
+ minor bump because of the feature commit) and the release notes would look similar to
349
+ the following:
350
+
351
+ .. code-block:: markdown
352
+
353
+ ## Features
354
+
355
+ - **config**: add new config option (#123)
356
+
357
+ ## Documentation
358
+
359
+ - **configuration**: defined new config option for the project (#123)
360
+
361
+ ## Refactoring
362
+
363
+ - **config**: change the implementation of config loading (#123)
364
+
365
+ Merge request numbers and commit hash values will be the same across all extracted
366
+ commits. Additionally, any :ref:`config-changelog-exclude_commit_patterns` will be
367
+ applied individually to each extracted commit so if you are have an exclusion match
368
+ for ignoring ``refactor`` commits, the second commit in the example above would be
369
+ excluded from the changelog.
370
+
371
+ .. important::
372
+ When squash commit evaluation is enabled, if you squashed a higher level bump commit
373
+ into the body of a lower level bump commit, the higher level bump commit will be
374
+ evaluated as the level bump for the entire squashed commit. This includes breaking
375
+ change descriptions.
376
+
377
+ ----
378
+
307
379
  .. _commit_parser-builtin-customization:
308
380
 
309
381
  Customization
@@ -429,28 +501,23 @@ available.
429
501
  .. _catching exceptions in Python is slower: https://docs.python.org/3/faq/design.html#how-fast-are-exceptions
430
502
  .. _namedtuple: https://docs.python.org/3/library/typing.html#typing.NamedTuple
431
503
 
432
- .. _commit-parsing-parser-options:
504
+ .. _commit_parser-parser-options:
433
505
 
434
506
  Parser Options
435
507
  """"""""""""""
436
508
 
437
- To provide options to the commit parser which is configured in the :ref:`configuration file
438
- <configuration>`, Python Semantic Release includes a
439
- :py:class:`ParserOptions <semantic_release.commit_parser._base.ParserOptions>`
440
- class. Each parser built into Python Semantic Release has a corresponding "options" class, which
441
- subclasses :py:class:`ParserOptions <semantic_release.commit_parser._base.ParserOptions>`.
442
-
443
- The configuration in :ref:`commit_parser_options <config-commit_parser_options>` is passed to the
444
- "options" class which is specified by the configured :ref:`commit_parser <config-commit_parser>` -
445
- more information on how this is specified is below.
509
+ When writing your own parser, you should accompany the parser with an "options" class
510
+ which accepts the appropriate keyword arguments. This class' ``__init__`` method should
511
+ store the values that are needed for parsing appropriately. Python Semantic Release will
512
+ pass any configuration options from the configuration file's
513
+ :ref:`commit_parser_options <config-commit_parser_options>`, into your custom parser options
514
+ class. To ensure that the configuration options are passed correctly, the options class
515
+ should inherit from the
516
+ :py:class:`ParserOptions <semantic_release.commit_parser._base.ParserOptions>` class.
446
517
 
447
518
  The "options" class is used to validate the options which are configured in the repository,
448
519
  and to provide default values for these options where appropriate.
449
520
 
450
- If you are writing your own parser, you should accompany it with an "options" class
451
- which accepts the appropriate keyword arguments. This class' ``__init__`` method should
452
- store the values that are needed for parsing appropriately.
453
-
454
521
  .. _commit-parsing-commit-parsers:
455
522
 
456
523
  Commit Parsers
@@ -811,66 +811,14 @@ For more information see :ref:`commit-parsing`.
811
811
 
812
812
  **Type:** ``dict[str, Any]``
813
813
 
814
- These options are passed directly to the ``parser_options`` method of
815
- :ref:`the commit parser <config-commit_parser>`, without validation
816
- or transformation.
814
+ This set of options are passed directly to the commit parser class specified in
815
+ :ref:`the commit parser <config-commit_parser>` configuration option.
817
816
 
818
- For more information, see :ref:`commit-parsing-parser-options`.
819
-
820
- The default value for this setting depends on what you specify as
821
- :ref:`commit_parser <config-commit_parser>`. The table below outlines
822
- the expections from ``commit_parser`` value to default options value.
823
-
824
- ================== == =================================
825
- ``commit_parser`` Default ``commit_parser_options``
826
- ================== == =================================
827
- ``"angular"`` -> .. code-block:: toml
828
-
829
- [semantic_release.commit_parser_options]
830
- allowed_types = [
831
- "build", "chore", "ci", "docs", "feat", "fix",
832
- "perf", "style", "refactor", "test"
833
- ]
834
- minor_types = ["feat"]
835
- patch_types = ["fix", "perf"]
836
-
837
- ``"emoji"`` -> .. code-block:: toml
838
-
839
- [semantic_release.commit_parser_options]
840
- major_tags = [":boom:"]
841
- minor_tags = [
842
- ":sparkles:", ":children_crossing:", ":lipstick:",
843
- ":iphone:", ":egg:", ":chart_with_upwards_trend:"
844
- ]
845
- patch_tags = [
846
- ":ambulance:", ":lock:", ":bug:", ":zap:", ":goal_net:",
847
- ":alien:", ":wheelchair:", ":speech_balloon:", ":mag:",
848
- ":apple:", ":penguin:", ":checkered_flag:", ":robot:",
849
- ":green_apple:"
850
- ]
851
-
852
- ``"scipy"`` -> .. code-block:: toml
853
-
854
- [semantic_release.commit_parser_options]
855
- allowed_tags = [
856
- "API", "DEP", "ENH", "REV", "BUG", "MAINT", "BENCH",
857
- "BLD", "DEV", "DOC", "STY", "TST", "REL", "FEAT", "TEST",
858
- ]
859
- major_tags = ["API",]
860
- minor_tags = ["DEP", "DEV", "ENH", "REV", "FEAT"]
861
- patch_tags = ["BLD", "BUG", "MAINT"]
862
-
863
- ``"tag"`` -> .. code-block:: toml
864
-
865
- [semantic_release.commit_parser_options]
866
- minor_tag = ":sparkles:"
867
- patch_tag = ":nut_and_bolt:"
868
-
869
- ``"module:class"`` -> ``**module:class.parser_options()``
870
- ================== == =================================
817
+ For more information (to include defaults), see
818
+ :ref:`commit_parser-builtin-customization`.
871
819
 
872
820
  **Default:** ``ParserOptions { ... }``, where ``...`` depends on
873
- :ref:`config-commit_parser` as indicated above.
821
+ :ref:`commit_parser <config-commit_parser>`.
874
822
 
875
823
  ----
876
824
 
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "python-semantic-release"
9
- version = "9.16.1"
9
+ version = "9.17.0"
10
10
  description = "Automatic Semantic Versioning for Python projects"
11
11
  requires-python = ">=3.8"
12
12
  license = { text = "MIT" }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.16.1
3
+ Version: 9.17.0
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -24,7 +24,7 @@ from semantic_release.version import (
24
24
  tags_and_versions,
25
25
  )
26
26
 
27
- __version__ = "9.16.1"
27
+ __version__ = "9.17.0"
28
28
 
29
29
  __all__ = [
30
30
  "CommitParser",
@@ -8,6 +8,8 @@ from pathlib import Path
8
8
  from re import compile as regexp
9
9
  from typing import TYPE_CHECKING, Any, Callable, Literal
10
10
 
11
+ from semantic_release.helpers import sort_numerically
12
+
11
13
  if TYPE_CHECKING: # pragma: no cover
12
14
  from jinja2 import Environment
13
15
 
@@ -87,6 +89,7 @@ def make_changelog_context(
87
89
  read_file,
88
90
  convert_md_to_rst,
89
91
  autofit_text_width,
92
+ sort_numerically,
90
93
  ),
91
94
  )
92
95
 
@@ -102,75 +102,85 @@ class ReleaseHistory:
102
102
 
103
103
  released.setdefault(the_version, release)
104
104
 
105
- # mypy will be happy if we make this an explicit string
106
- commit_message = str(commit.message)
107
-
108
105
  log.info(
109
106
  "parsing commit [%s] %s",
110
107
  commit.hexsha[:8],
111
- commit_message.replace("\n", " ")[:54],
112
- )
113
- parse_result = commit_parser.parse(commit)
114
- commit_type = (
115
- "unknown" if isinstance(parse_result, ParseError) else parse_result.type
116
- )
117
-
118
- has_exclusion_match = any(
119
- pattern.match(commit_message) for pattern in exclude_commit_patterns
120
- )
121
-
122
- commit_level_bump = (
123
- LevelBump.NO_RELEASE
124
- if isinstance(parse_result, ParseError)
125
- else parse_result.bump
108
+ str(commit.message).replace("\n", " ")[:54],
126
109
  )
110
+ # returns a ParseResult or list of ParseResult objects,
111
+ # it is usually one, but we split a commit if a squashed merge is detected
112
+ parse_results = commit_parser.parse(commit)
113
+ if not isinstance(parse_results, list):
114
+ parse_results = [parse_results]
115
+
116
+ is_squash_commit = bool(len(parse_results) > 1)
117
+
118
+ # iterate through parsed commits to add to changelog definition
119
+ for parsed_result in parse_results:
120
+ commit_message = str(parsed_result.commit.message)
121
+ commit_type = (
122
+ "unknown"
123
+ if isinstance(parsed_result, ParseError)
124
+ else parsed_result.type
125
+ )
126
+ log.debug("commit has type '%s'", commit_type)
127
127
 
128
- # Skip excluded commits except for any commit causing a version bump
129
- # Reasoning: if a commit causes a version bump, and no other commits
130
- # are included, then the changelog will be empty. Even if ther was other
131
- # commits included, the true reason for a version bump would be missing.
132
- if has_exclusion_match and commit_level_bump == LevelBump.NO_RELEASE:
133
- log.info(
134
- "Excluding commit [%s] %s",
135
- commit.hexsha[:8],
136
- commit_message.replace("\n", " ")[:50],
128
+ has_exclusion_match = any(
129
+ pattern.match(commit_message) for pattern in exclude_commit_patterns
137
130
  )
138
- continue
139
131
 
140
- if (
141
- isinstance(parse_result, ParsedCommit)
142
- and not parse_result.include_in_changelog
143
- ):
144
- log.info(
145
- str.join(
146
- " ",
147
- [
148
- "Excluding commit %s (%s) because parser determined",
149
- "it should not included in the changelog",
150
- ],
151
- ),
152
- commit.hexsha[:8],
153
- commit_message.replace("\n", " ")[:20],
132
+ commit_level_bump = (
133
+ LevelBump.NO_RELEASE
134
+ if isinstance(parsed_result, ParseError)
135
+ else parsed_result.bump
154
136
  )
155
- continue
156
137
 
157
- if the_version is None:
138
+ # Skip excluded commits except for any commit causing a version bump
139
+ # Reasoning: if a commit causes a version bump, and no other commits
140
+ # are included, then the changelog will be empty. Even if ther was other
141
+ # commits included, the true reason for a version bump would be missing.
142
+ if has_exclusion_match and commit_level_bump == LevelBump.NO_RELEASE:
143
+ log.info(
144
+ "Excluding %s commit[%s] %s",
145
+ "piece of squashed" if is_squash_commit else "",
146
+ parsed_result.short_hash,
147
+ commit_message.split("\n", maxsplit=1)[0][:20],
148
+ )
149
+ continue
150
+
151
+ if (
152
+ isinstance(parsed_result, ParsedCommit)
153
+ and not parsed_result.include_in_changelog
154
+ ):
155
+ log.info(
156
+ str.join(
157
+ " ",
158
+ [
159
+ "Excluding commit[%s] because parser determined",
160
+ "it should not included in the changelog",
161
+ ],
162
+ ),
163
+ parsed_result.short_hash,
164
+ )
165
+ continue
166
+
167
+ if the_version is None:
168
+ log.info(
169
+ "[Unreleased] adding commit[%s] to unreleased '%s'",
170
+ parsed_result.short_hash,
171
+ commit_type,
172
+ )
173
+ unreleased[commit_type].append(parsed_result)
174
+ continue
175
+
158
176
  log.info(
159
- "[Unreleased] adding '%s' commit(%s) to list",
160
- commit.hexsha[:8],
177
+ "[%s] adding commit[%s] to release '%s'",
178
+ the_version,
179
+ parsed_result.short_hash,
161
180
  commit_type,
162
181
  )
163
- unreleased[commit_type].append(parse_result)
164
- continue
165
-
166
- log.info(
167
- "[%s] adding '%s' commit(%s) to release",
168
- the_version,
169
- commit_type,
170
- commit.hexsha[:8],
171
- )
172
182
 
173
- released[the_version]["elements"][commit_type].append(parse_result)
183
+ released[the_version]["elements"][commit_type].append(parsed_result)
174
184
 
175
185
  return cls(unreleased=unreleased, released=released)
176
186
 
@@ -54,7 +54,6 @@ def environment(
54
54
  autoescape_value = dynamic_import(autoescape)
55
55
  else:
56
56
  autoescape_value = autoescape
57
- log.debug("%s", locals())
58
57
 
59
58
  return ComplexDirectorySandboxedEnvironment(
60
59
  block_start_string=block_start_string,
@@ -24,6 +24,7 @@ from semantic_release.cli.const import (
24
24
  )
25
25
  from semantic_release.cli.util import noop_report
26
26
  from semantic_release.errors import InternalError
27
+ from semantic_release.helpers import sort_numerically
27
28
 
28
29
  if TYPE_CHECKING: # pragma: no cover
29
30
  from jinja2 import Environment
@@ -254,7 +255,11 @@ def generate_release_notes(
254
255
  version=release["version"],
255
256
  release=release,
256
257
  mask_initial_release=mask_initial_release,
257
- filters=(*hvcs_client.get_changelog_context_filters(), autofit_text_width),
258
+ filters=(
259
+ *hvcs_client.get_changelog_context_filters(),
260
+ autofit_text_width,
261
+ sort_numerically,
262
+ ),
258
263
  ).bind_to_environment(
259
264
  # Use a new, non-configurable environment for release notes -
260
265
  # not user-configurable at the moment
@@ -65,7 +65,7 @@ def is_forced_prerelease(
65
65
  log.debug(
66
66
  "%s: %s",
67
67
  is_forced_prerelease.__name__,
68
- ", ".join(f"{k} = {v}" for k, v in local_vars),
68
+ str.join(", ", iter(f"{k} = {v}" for k, v in local_vars)),
69
69
  )
70
70
  return (
71
71
  as_prerelease
@@ -602,7 +602,12 @@ class RuntimeContext:
602
602
  # Retrieve details from repository
603
603
  with Repo(str(raw.repo_dir)) as git_repo:
604
604
  try:
605
- remote_url = raw.remote.url or git_repo.remote(raw.remote.name).url
605
+ # Get the remote url by calling out to `git remote get-url`. This returns
606
+ # the expanded url, taking into account any insteadOf directives
607
+ # in the git configuration.
608
+ remote_url = raw.remote.url or git_repo.git.remote(
609
+ "get-url", raw.remote.name
610
+ )
606
611
  active_branch = git_repo.active_branch.name
607
612
  except ValueError as err:
608
613
  raise MissingGitRemote(
@@ -27,7 +27,7 @@ class MaskingFilter(logging.Filter):
27
27
 
28
28
  def add_mask_for(self, data: str, name: str = "redacted") -> MaskingFilter:
29
29
  if data and data not in self._UNWANTED:
30
- log.debug("Adding redact pattern %r to _redact_patterns", name)
30
+ log.debug("Adding redact pattern '%r' to redact_patterns", name)
31
31
  self._redact_patterns[name].add(data)
32
32
  return self
33
33
 
@@ -81,4 +81,4 @@ class CommitParser(ABC, Generic[_TT, _OPTS]):
81
81
  return self.parser_options() # type: ignore[return-value]
82
82
 
83
83
  @abstractmethod
84
- def parse(self, commit: Commit) -> _TT: ...
84
+ def parse(self, commit: Commit) -> _TT | list[_TT]: ...