python-semantic-release 9.11.0__tar.gz → 9.12.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.
- {python_semantic_release-9.11.0/python_semantic_release.egg-info → python_semantic_release-9.12.0}/PKG-INFO +1 -1
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/automatic-releases/github-actions.rst +5 -5
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/changelog_templates.rst +19 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/commit-parsing.rst +3 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/configuration.rst +1 -1
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/pyproject.toml +1 -1
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0/python_semantic_release.egg-info}/PKG-INFO +1 -1
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/python_semantic_release.egg-info/SOURCES.txt +0 -1
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/__init__.py +1 -1
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/changelog/context.py +53 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/changelog/release_history.py +45 -26
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/changelog/template.py +1 -7
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/changelog_writer.py +2 -1
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/commands/main.py +1 -1
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/config.py +16 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/commit_parser/angular.py +9 -6
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/commit_parser/emoji.py +11 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/commit_parser/scipy.py +12 -10
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/commit_parser/tag.py +9 -5
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/command_line/test_changelog.py +0 -20
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/command_line/test_version.py +89 -33
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/const.py +0 -30
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/commit_parsers.py +0 -12
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/example_project.py +0 -15
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/git_repo.py +0 -3
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +3 -70
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +3 -68
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +1 -49
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +1 -45
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +1 -46
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +1 -34
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/scenario/test_next_version.py +4 -599
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/changelog/test_changelog_context.py +139 -8
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/commit_parser/test_angular.py +1 -1
- python_semantic_release-9.11.0/tests/unit/semantic_release/commit_parser/test_tag.py +0 -79
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/AUTHORS.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/LICENSE +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/MANIFEST.in +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/README.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/Makefile +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/algorithm.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/automatic-releases/cronjobs.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/automatic-releases/index.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/automatic-releases/travis.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/commands.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/conf.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/contributing.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/contributors.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/index.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/make.bat +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/migrating_from_v7.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/multibranch_releases.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/strict_mode.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/troubleshooting.rst +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/python_semantic_release.egg-info/dependency_links.txt +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/python_semantic_release.egg-info/entry_points.txt +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/python_semantic_release.egg-info/requires.txt +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/python_semantic_release.egg-info/top_level.txt +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/__main__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/cli_context.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/commands/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/commands/changelog.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/commands/generate_config.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/commands/publish.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/commands/version.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/const.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/github_actions_output.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/masking_filter.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/util.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/commit_parser/_base.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/commit_parser/token.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/commit_parser/util.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/const.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/md/.changelog_header.md.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/md/.changelog_init.md.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/md/.changelog_update.md.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/md/.changes.md.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/md/.unreleased_changes.md.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/md/.versioned_changes.md.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/md/CHANGELOG.md.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/release_notes.md.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/rst/.changelog_header.rst.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/rst/.changelog_init.rst.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/rst/.changelog_update.rst.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/rst/.changes.rst.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/rst/.macros.rst.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/rst/.unreleased_changes.rst.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/rst/.versioned_changes.rst.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/data/templates/angular/rst/CHANGELOG.rst.j2 +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/enums.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/errors.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/gitproject.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/helpers.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/hvcs/_base.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/hvcs/bitbucket.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/hvcs/gitea.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/hvcs/github.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/hvcs/gitlab.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/hvcs/remote_hvcs_base.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/hvcs/token_auth.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/hvcs/util.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/version/algorithm.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/version/declaration.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/version/translator.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/version/version.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/setup.cfg +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/command_line/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/command_line/conftest.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/command_line/test_generate_config.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/command_line/test_help.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/command_line/test_main.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/command_line/test_publish.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/conftest.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/repos/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/repos/git_flow/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/repos/github_flow/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/fixtures/scipy.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/scenario/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/scenario/test_release_history.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/scenario/test_template_render.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/scenario/test_version_stamp.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/changelog/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/changelog/test_release_notes.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/changelog/test_template.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/cli/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/cli/test_config.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/cli/test_util.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/cli/test_version.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/test_helpers.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/version/__init__.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/version/test_declaration.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/version/test_translator.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/unit/semantic_release/version/test_version.py +0 -0
- {python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/tests/util.py +0 -0
|
@@ -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.
|
|
340
|
+
- uses: python-semantic-release/python-semantic-release@v9.12.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.
|
|
687
|
+
uses: python-semantic-release/python-semantic-release@v9.12.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.
|
|
747
|
+
uses: python-semantic-release/python-semantic-release@v9.12.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.
|
|
775
|
+
uses: python-semantic-release/python-semantic-release@v9.12.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.
|
|
781
|
+
uses: python-semantic-release/python-semantic-release@v9.12.0
|
|
782
782
|
with:
|
|
783
783
|
directory: ./project2
|
|
784
784
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
{python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/docs/changelog_templates.rst
RENAMED
|
@@ -587,6 +587,24 @@ arguments are passed in parentheses like normal function calls.
|
|
|
587
587
|
|
|
588
588
|
The filters provided vary based on the VCS configured and available features:
|
|
589
589
|
|
|
590
|
+
* ``autofit_text_width (Callable[[textStr, maxWidthInt, indent_sizeInt], textStr])``: given a
|
|
591
|
+
text string, fit the text to the maximum width provided. This filter is useful when you want
|
|
592
|
+
to wrap text to a specific width. The filter will attempt to break the text at word boundaries
|
|
593
|
+
and will indent the text by the amount specified in the ``indent_size`` parameter.
|
|
594
|
+
|
|
595
|
+
*Introduced in v9.12.0.*
|
|
596
|
+
|
|
597
|
+
**Example Usage:**
|
|
598
|
+
|
|
599
|
+
.. code:: jinja
|
|
600
|
+
|
|
601
|
+
{{ "This is a long string that needs to be wrapped to a specific width" | autofit_text_width(40, 4) }}
|
|
602
|
+
|
|
603
|
+
.. code:: markdown
|
|
604
|
+
|
|
605
|
+
This is a long string that needs to be
|
|
606
|
+
wrapped to a specific width
|
|
607
|
+
|
|
590
608
|
* ``convert_md_to_rst (Callable[[MdStr], RstStr])``: given a markdown string, convert it to
|
|
591
609
|
reStructuredText format. This filter is useful when building a reStructuredText changelog
|
|
592
610
|
but your commit messages are in markdown format. It is utilized by the default RST changelog
|
|
@@ -744,6 +762,7 @@ Availability of the documented filters can be found in the table below:
|
|
|
744
762
|
====================== ========= ===== ====== ======
|
|
745
763
|
**filter - hvcs_type** bitbucket gitea github gitlab
|
|
746
764
|
====================== ========= ===== ====== ======
|
|
765
|
+
autofit_text_width ✅ ✅ ✅ ✅
|
|
747
766
|
convert_md_to_rst ✅ ✅ ✅ ✅
|
|
748
767
|
create_server_url ✅ ✅ ✅ ✅
|
|
749
768
|
create_repo_url ✅ ✅ ✅ ✅
|
|
@@ -160,6 +160,9 @@ The default configuration options for
|
|
|
160
160
|
``semantic_release.history.TagCommitParser``
|
|
161
161
|
""""""""""""""""""""""""""""""""""""""""""""
|
|
162
162
|
|
|
163
|
+
.. warning::
|
|
164
|
+
This parser was deprecated in ``v9.12.0``. It will be removed in a future release.
|
|
165
|
+
|
|
163
166
|
The original parser from v1.0.0 of Python Semantic Release. Similar to the
|
|
164
167
|
emoji parser above, but with less features.
|
|
165
168
|
|
|
@@ -763,7 +763,7 @@ Built-in parsers:
|
|
|
763
763
|
* ``angular`` - :ref:`AngularCommitParser <commit-parser-angular>`
|
|
764
764
|
* ``emoji`` - :ref:`EmojiCommitParser <commit-parser-emoji>`
|
|
765
765
|
* ``scipy`` - :ref:`ScipyCommitParser <commit-parser-scipy>`
|
|
766
|
-
* ``tag`` - :ref:`TagCommitParser <commit-parser-tag>`
|
|
766
|
+
* ``tag`` - :ref:`TagCommitParser <commit-parser-tag>` *(deprecated in v9.12.0)*
|
|
767
767
|
|
|
768
768
|
You can set any of the built-in parsers by their keyword but you can also specify
|
|
769
769
|
your own commit parser in ``module:attr`` form.
|
|
@@ -158,7 +158,6 @@ tests/unit/semantic_release/commit_parser/test_angular.py
|
|
|
158
158
|
tests/unit/semantic_release/commit_parser/test_emoji.py
|
|
159
159
|
tests/unit/semantic_release/commit_parser/test_parsed_commit.py
|
|
160
160
|
tests/unit/semantic_release/commit_parser/test_scipy.py
|
|
161
|
-
tests/unit/semantic_release/commit_parser/test_tag.py
|
|
162
161
|
tests/unit/semantic_release/commit_parser/test_util.py
|
|
163
162
|
tests/unit/semantic_release/hvcs/__init__.py
|
|
164
163
|
tests/unit/semantic_release/hvcs/test__base.py
|
|
@@ -82,14 +82,19 @@ def make_changelog_context(
|
|
|
82
82
|
*hvcs_client.get_changelog_context_filters(),
|
|
83
83
|
read_file,
|
|
84
84
|
convert_md_to_rst,
|
|
85
|
+
autofit_text_width,
|
|
85
86
|
),
|
|
86
87
|
)
|
|
87
88
|
|
|
88
89
|
|
|
89
90
|
def read_file(filepath: str) -> str:
|
|
90
91
|
try:
|
|
92
|
+
if not filepath:
|
|
93
|
+
raise FileNotFoundError("No file path provided") # noqa: TRY301
|
|
94
|
+
|
|
91
95
|
with Path(filepath).open(newline=os.linesep) as rfd:
|
|
92
96
|
return rfd.read()
|
|
97
|
+
|
|
93
98
|
except FileNotFoundError as err:
|
|
94
99
|
logging.warning(err)
|
|
95
100
|
return ""
|
|
@@ -112,3 +117,51 @@ def convert_md_to_rst(md_content: str) -> str:
|
|
|
112
117
|
rst_content = pattern.sub(replacement, rst_content)
|
|
113
118
|
|
|
114
119
|
return rst_content
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def autofit_text_width(text: str, maxwidth: int = 100, indent_size: int = 0) -> str:
|
|
123
|
+
"""Format the description text to fit within a specified width"""
|
|
124
|
+
input_text = text.strip()
|
|
125
|
+
|
|
126
|
+
if len(input_text) <= maxwidth:
|
|
127
|
+
# If the text is already within the maxwidth, return immediately
|
|
128
|
+
return input_text
|
|
129
|
+
|
|
130
|
+
indent = " " * indent_size
|
|
131
|
+
formatted_description = []
|
|
132
|
+
|
|
133
|
+
# Re-format text to fit within the maxwidth
|
|
134
|
+
for paragraph in input_text.split("\n\n"):
|
|
135
|
+
formatted_paragraph = []
|
|
136
|
+
|
|
137
|
+
# Split the paragraph into words with no empty strings
|
|
138
|
+
words = list(
|
|
139
|
+
filter(
|
|
140
|
+
None, paragraph.replace("\r", "").replace("\n", " ").strip().split(" ")
|
|
141
|
+
)
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
# Initialize the line for each paragraph
|
|
145
|
+
line = words[0]
|
|
146
|
+
next_line = ""
|
|
147
|
+
|
|
148
|
+
for word in words[1:]:
|
|
149
|
+
# Check if the current line + the next word (and a space) will fit within the maxwidth
|
|
150
|
+
# If it does, then update the current line
|
|
151
|
+
next_line = f"{line} {word}"
|
|
152
|
+
if len(next_line) <= maxwidth:
|
|
153
|
+
line = next_line
|
|
154
|
+
continue
|
|
155
|
+
|
|
156
|
+
# Add the current line to the paragraph and start a new line
|
|
157
|
+
formatted_paragraph.append(line)
|
|
158
|
+
line = f"{indent}{word}"
|
|
159
|
+
|
|
160
|
+
# Store the last line in the paragraph since it hasn't reached the maxwidth yet
|
|
161
|
+
formatted_paragraph.append(line)
|
|
162
|
+
|
|
163
|
+
#
|
|
164
|
+
formatted_description.append(str.join("\n", formatted_paragraph))
|
|
165
|
+
|
|
166
|
+
# Print the formatted description
|
|
167
|
+
return str.join("\n\n", formatted_description).strip()
|
|
@@ -8,6 +8,7 @@ from typing import TYPE_CHECKING, TypedDict
|
|
|
8
8
|
from git.objects.tag import TagObject
|
|
9
9
|
|
|
10
10
|
from semantic_release.commit_parser import ParseError
|
|
11
|
+
from semantic_release.enums import LevelBump
|
|
11
12
|
from semantic_release.version.algorithm import tags_and_versions
|
|
12
13
|
|
|
13
14
|
if TYPE_CHECKING:
|
|
@@ -58,20 +59,11 @@ class ReleaseHistory:
|
|
|
58
59
|
# we place the key-value mapping type_ to ParseResult as before.
|
|
59
60
|
# We do this until we encounter a commit which another tag matches.
|
|
60
61
|
|
|
61
|
-
is_commit_released = False
|
|
62
62
|
the_version: Version | None = None
|
|
63
63
|
|
|
64
64
|
for commit in repo.iter_commits("HEAD", topo_order=True):
|
|
65
|
-
#
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
parse_result = commit_parser.parse(commit)
|
|
69
|
-
commit_type = (
|
|
70
|
-
"unknown" if isinstance(parse_result, ParseError) else parse_result.type
|
|
71
|
-
)
|
|
72
|
-
log.debug("commit has type %s", commit_type)
|
|
73
|
-
|
|
74
|
-
log.debug("checking if commit %s matches any tags", commit.hexsha)
|
|
65
|
+
# Determine if we have found another release
|
|
66
|
+
log.debug("checking if commit %s matches any tags", commit.hexsha[:7])
|
|
75
67
|
t_v = tag_sha_2_version_lookup.get(commit.hexsha, None)
|
|
76
68
|
|
|
77
69
|
if t_v is None:
|
|
@@ -82,7 +74,6 @@ class ReleaseHistory:
|
|
|
82
74
|
# we have found the latest commit introduced by this tag
|
|
83
75
|
# so we create a new Release entry
|
|
84
76
|
log.debug("found commit %s for tag %s", commit.hexsha, tag.name)
|
|
85
|
-
is_commit_released = True
|
|
86
77
|
|
|
87
78
|
# tag.object is a Commit if the tag is lightweight, otherwise
|
|
88
79
|
# it is a TagObject with additional metadata about the tag
|
|
@@ -110,27 +101,55 @@ class ReleaseHistory:
|
|
|
110
101
|
|
|
111
102
|
released.setdefault(the_version, release)
|
|
112
103
|
|
|
113
|
-
if
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
# mypy will be happy if we make this an explicit string
|
|
105
|
+
commit_message = str(commit.message)
|
|
106
|
+
|
|
107
|
+
log.info(
|
|
108
|
+
"parsing commit [%s] %s",
|
|
109
|
+
commit.hexsha[:8],
|
|
110
|
+
commit_message.replace("\n", " ")[:54],
|
|
111
|
+
)
|
|
112
|
+
parse_result = commit_parser.parse(commit)
|
|
113
|
+
commit_type = (
|
|
114
|
+
"unknown" if isinstance(parse_result, ParseError) else parse_result.type
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
has_exclusion_match = any(
|
|
118
|
+
pattern.match(commit_message) for pattern in exclude_commit_patterns
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
commit_level_bump = (
|
|
122
|
+
LevelBump.NO_RELEASE
|
|
123
|
+
if isinstance(parse_result, ParseError)
|
|
124
|
+
else parse_result.bump
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
# Skip excluded commits except for any commit causing a version bump
|
|
128
|
+
# Reasoning: if a commit causes a version bump, and no other commits
|
|
129
|
+
# are included, then the changelog will be empty. Even if ther was other
|
|
130
|
+
# commits included, the true reason for a version bump would be missing.
|
|
131
|
+
if has_exclusion_match and commit_level_bump == LevelBump.NO_RELEASE:
|
|
132
|
+
log.info(
|
|
133
|
+
"Excluding commit [%s] %s",
|
|
134
|
+
commit.hexsha[:8],
|
|
135
|
+
commit_message.replace("\n", " ")[:50],
|
|
118
136
|
)
|
|
119
137
|
continue
|
|
120
138
|
|
|
121
|
-
if
|
|
122
|
-
log.
|
|
139
|
+
if the_version is None:
|
|
140
|
+
log.info(
|
|
141
|
+
"[Unreleased] adding '%s' commit(%s) to list",
|
|
142
|
+
commit.hexsha[:8],
|
|
143
|
+
commit_type,
|
|
144
|
+
)
|
|
123
145
|
unreleased[commit_type].append(parse_result)
|
|
124
146
|
continue
|
|
125
147
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
log.debug(
|
|
130
|
-
"adding commit %s with type %s to release section for %s",
|
|
131
|
-
commit.hexsha,
|
|
132
|
-
commit_type,
|
|
148
|
+
log.info(
|
|
149
|
+
"[%s] adding '%s' commit(%s) to release",
|
|
133
150
|
the_version,
|
|
151
|
+
commit_type,
|
|
152
|
+
commit.hexsha[:8],
|
|
134
153
|
)
|
|
135
154
|
|
|
136
155
|
released[the_version]["elements"][commit_type].append(parse_result)
|
|
@@ -92,7 +92,6 @@ class ComplexDirectorySandboxedEnvironment(SandboxedEnvironment):
|
|
|
92
92
|
return str(PurePosixPath(parent).parent / template)
|
|
93
93
|
|
|
94
94
|
|
|
95
|
-
# pylint: disable=redefined-outer-name
|
|
96
95
|
def recursive_render(
|
|
97
96
|
template_dir: Path,
|
|
98
97
|
environment: Environment,
|
|
@@ -103,13 +102,8 @@ def recursive_render(
|
|
|
103
102
|
(Path(root), file)
|
|
104
103
|
for root, _, files in os.walk(template_dir)
|
|
105
104
|
for file in files
|
|
106
|
-
# we slice relpath.parts[1:] to allow the top-level
|
|
107
|
-
# template folder to have a dot prefix.
|
|
108
|
-
# e.g. to permit ".github/psr-templates" to contain the templates,
|
|
109
|
-
# rather than enforcing a top-level, non-hidden directory
|
|
110
105
|
if not any(
|
|
111
|
-
elem.startswith(".")
|
|
112
|
-
for elem in Path(root).relative_to(template_dir).parts[1:]
|
|
106
|
+
elem.startswith(".") for elem in Path(root).relative_to(template_dir).parts
|
|
113
107
|
)
|
|
114
108
|
and not file.startswith(".")
|
|
115
109
|
):
|
|
@@ -12,6 +12,7 @@ from importlib_resources import files
|
|
|
12
12
|
import semantic_release
|
|
13
13
|
from semantic_release.changelog.context import (
|
|
14
14
|
ReleaseNotesContext,
|
|
15
|
+
autofit_text_width,
|
|
15
16
|
make_changelog_context,
|
|
16
17
|
)
|
|
17
18
|
from semantic_release.changelog.template import environment, recursive_render
|
|
@@ -245,7 +246,7 @@ def generate_release_notes(
|
|
|
245
246
|
hvcs_type=hvcs_client.__class__.__name__.lower(),
|
|
246
247
|
version=release["version"],
|
|
247
248
|
release=release,
|
|
248
|
-
filters=(*hvcs_client.get_changelog_context_filters(),),
|
|
249
|
+
filters=(*hvcs_client.get_changelog_context_filters(), autofit_text_width),
|
|
249
250
|
).bind_to_environment(
|
|
250
251
|
# Use a new, non-configurable environment for release notes -
|
|
251
252
|
# not user-configurable at the moment
|
{python_semantic_release-9.11.0 → python_semantic_release-9.12.0}/semantic_release/cli/config.py
RENAMED
|
@@ -370,6 +370,22 @@ class RawConfig(BaseModel):
|
|
|
370
370
|
)
|
|
371
371
|
return found_path
|
|
372
372
|
|
|
373
|
+
@field_validator("commit_parser", mode="after")
|
|
374
|
+
@classmethod
|
|
375
|
+
def tag_commit_parser_deprecation_warning(cls, val: str) -> str:
|
|
376
|
+
if val == "tag":
|
|
377
|
+
log.warning(
|
|
378
|
+
str.join(
|
|
379
|
+
" ",
|
|
380
|
+
[
|
|
381
|
+
"The legacy 'tag' parser is deprecated and will be removed in v11.",
|
|
382
|
+
"Recommend swapping to our emoji parser (higher-compatibility)",
|
|
383
|
+
"or switch to another supported parser.",
|
|
384
|
+
],
|
|
385
|
+
)
|
|
386
|
+
)
|
|
387
|
+
return val
|
|
388
|
+
|
|
373
389
|
@field_validator("build_command_env", mode="after")
|
|
374
390
|
@classmethod
|
|
375
391
|
def remove_whitespace(cls, val: list[str]) -> list[str]:
|
|
@@ -19,11 +19,11 @@ from semantic_release.enums import LevelBump
|
|
|
19
19
|
if TYPE_CHECKING:
|
|
20
20
|
from git.objects.commit import Commit
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
logger = logging.getLogger(__name__)
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
def _logged_parse_error(commit: Commit, error: str) -> ParseError:
|
|
26
|
-
|
|
26
|
+
logger.debug(error)
|
|
27
27
|
return ParseError(commit, error=error)
|
|
28
28
|
|
|
29
29
|
|
|
@@ -35,7 +35,7 @@ LONG_TYPE_NAMES = {
|
|
|
35
35
|
"chore": "chores",
|
|
36
36
|
"docs": "documentation",
|
|
37
37
|
"feat": "features",
|
|
38
|
-
"fix": "fixes",
|
|
38
|
+
"fix": "bug fixes",
|
|
39
39
|
"perf": "performance improvements",
|
|
40
40
|
"refactor": "refactoring",
|
|
41
41
|
"style": "code style",
|
|
@@ -131,12 +131,15 @@ class AngularCommitParser(CommitParser[ParseResult, AngularParserOptions]):
|
|
|
131
131
|
level_bump = LevelBump.PATCH
|
|
132
132
|
else:
|
|
133
133
|
level_bump = self.options.default_bump_level
|
|
134
|
-
|
|
134
|
+
logger.debug(
|
|
135
135
|
"commit %s introduces a level bump of %s due to the default_bump_level",
|
|
136
|
-
commit.hexsha,
|
|
136
|
+
commit.hexsha[:8],
|
|
137
137
|
level_bump,
|
|
138
138
|
)
|
|
139
|
-
|
|
139
|
+
|
|
140
|
+
logger.debug(
|
|
141
|
+
"commit %s introduces a %s level_bump", commit.hexsha[:8], level_bump
|
|
142
|
+
)
|
|
140
143
|
|
|
141
144
|
return ParsedCommit(
|
|
142
145
|
bump=level_bump,
|
|
@@ -89,6 +89,17 @@ class EmojiCommitParser(CommitParser[ParseResult, EmojiParserOptions]):
|
|
|
89
89
|
level_bump = LevelBump.MINOR
|
|
90
90
|
elif primary_emoji in self.options.patch_tags:
|
|
91
91
|
level_bump = LevelBump.PATCH
|
|
92
|
+
else:
|
|
93
|
+
level_bump = self.options.default_bump_level
|
|
94
|
+
logger.debug(
|
|
95
|
+
"commit %s introduces a level bump of %s due to the default_bump_level",
|
|
96
|
+
commit.hexsha[:8],
|
|
97
|
+
level_bump,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
logger.debug(
|
|
101
|
+
"commit %s introduces a %s level_bump", commit.hexsha[:8], level_bump
|
|
102
|
+
)
|
|
92
103
|
|
|
93
104
|
# All emojis will remain part of the returned description
|
|
94
105
|
descriptions = parse_paragraphs(message)
|
|
@@ -59,11 +59,11 @@ from semantic_release.enums import LevelBump
|
|
|
59
59
|
if TYPE_CHECKING:
|
|
60
60
|
from git.objects.commit import Commit
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
logger = logging.getLogger(__name__)
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
def _logged_parse_error(commit: Commit, error: str) -> ParseError:
|
|
66
|
-
|
|
66
|
+
logger.debug(error)
|
|
67
67
|
return ParseError(commit, error=error)
|
|
68
68
|
|
|
69
69
|
|
|
@@ -165,17 +165,19 @@ class ScipyCommitParser(CommitParser[ParseResult, ScipyParserOptions]):
|
|
|
165
165
|
level_bump = self.options.tag_to_level.get(
|
|
166
166
|
tag, self.options.default_level_bump
|
|
167
167
|
)
|
|
168
|
-
|
|
169
|
-
"commit %s introduces a %s level_bump",
|
|
168
|
+
logger.debug(
|
|
169
|
+
"commit %s introduces a %s level_bump",
|
|
170
|
+
commit.hexsha[:8],
|
|
171
|
+
level_bump,
|
|
170
172
|
)
|
|
171
173
|
break
|
|
172
174
|
else:
|
|
173
175
|
# some commits may not have a tag, e.g. if they belong to a PR that
|
|
174
176
|
# wasn't squashed (for maintainability) ignore them
|
|
175
177
|
section, level_bump = "None", self.options.default_level_bump
|
|
176
|
-
|
|
177
|
-
"commit %s introduces a level bump of %s due to the
|
|
178
|
-
commit.hexsha,
|
|
178
|
+
logger.debug(
|
|
179
|
+
"commit %s introduces a level bump of %s due to the default bump level",
|
|
180
|
+
commit.hexsha[:8],
|
|
179
181
|
level_bump,
|
|
180
182
|
)
|
|
181
183
|
|
|
@@ -185,9 +187,9 @@ class ScipyCommitParser(CommitParser[ParseResult, ScipyParserOptions]):
|
|
|
185
187
|
]
|
|
186
188
|
if migration_instructions:
|
|
187
189
|
level_bump = LevelBump.MAJOR
|
|
188
|
-
|
|
189
|
-
"commit %s upgraded to a %s
|
|
190
|
-
commit.hexsha,
|
|
190
|
+
logger.debug(
|
|
191
|
+
"commit %s upgraded to a %s level bump due to included migration instructions",
|
|
192
|
+
commit.hexsha[:8],
|
|
191
193
|
level_bump,
|
|
192
194
|
)
|
|
193
195
|
|
|
@@ -11,7 +11,7 @@ from semantic_release.commit_parser.token import ParsedCommit, ParseError, Parse
|
|
|
11
11
|
from semantic_release.commit_parser.util import breaking_re, parse_paragraphs
|
|
12
12
|
from semantic_release.enums import LevelBump
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
15
|
|
|
16
16
|
re_parser = re.compile(r"(?P<subject>[^\n]+)" + r"(:?\n\n(?P<text>.+))?", re.DOTALL)
|
|
17
17
|
|
|
@@ -23,7 +23,7 @@ class TagParserOptions(ParserOptions):
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
def _logged_parse_error(commit: Commit, error: str) -> ParseError:
|
|
26
|
-
|
|
26
|
+
logger.debug(error)
|
|
27
27
|
return ParseError(commit, error=error)
|
|
28
28
|
|
|
29
29
|
|
|
@@ -87,12 +87,16 @@ class TagCommitParser(CommitParser[ParseResult, TagParserOptions]):
|
|
|
87
87
|
if breaking_descriptions:
|
|
88
88
|
level = "breaking"
|
|
89
89
|
level_bump = LevelBump.MAJOR
|
|
90
|
-
|
|
91
|
-
"commit %s upgraded to a %s level_bump due to
|
|
92
|
-
commit.hexsha,
|
|
90
|
+
logger.debug(
|
|
91
|
+
"commit %s upgraded to a %s level_bump due to included breaking descriptions",
|
|
92
|
+
commit.hexsha[:8],
|
|
93
93
|
level_bump,
|
|
94
94
|
)
|
|
95
95
|
|
|
96
|
+
logger.debug(
|
|
97
|
+
"commit %s introduces a %s level_bump", commit.hexsha[:8], level_bump
|
|
98
|
+
)
|
|
99
|
+
|
|
96
100
|
return ParsedCommit(
|
|
97
101
|
bump=level_bump,
|
|
98
102
|
type=level,
|