Skip to content

v8.0.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 16 Nov 03:21
· 43 commits to master since this release

v8.0.0 (2024-11-16)

Bug Fixes

  • release-notes: Override default wordwrap to non-wrap for in default template (99ab99b)

  • changelog-rst: Ignore unknown parsed commit types in default RST changelog (77609b1)

  • parser-angular: Drop the breaking category but still maintain a major level bump (f1ffa54)

  • parsers: Improve reliability of text unwordwrap of descriptions (436374b)

  • hvcs-*: Add flexibility to issue & MR/PR url jinja filters (#1089, 275ec88)

  • fix(github): fix issue_url filter to ignore an issue prefix gracefully

  • fix(github): fix pull_request_url filter to ignore an PR prefix gracefully

  • fix(gitlab): fix issue_url filter to ignore an issue prefix gracefully

  • fix(gitlab): fix merge_request_url filter to ignore an PR prefix gracefully

  • fix(gitea): fix issue_url filter to ignore an issue prefix gracefully

  • fix(gitea): fix pull_request_url filter to ignore an PR prefix gracefully

  • fix(bitbucket): fix pull_request_url filter to ignore an PR prefix gracefully

  • test(bitbucket): add test case for prefixed PR numbers

  • test(gitea): add test case for prefixed PR & issue numbers

  • test(gitlab): add test case for prefixed PR & issue numbers

  • test(github): add test case for prefixed PR & issue numbers

  • style(hvcs): fix logical lint errors

  • docs(changelog-templates): update descriptions of issue & MR/PR url jinja filters

  • cli: Gracefully capture all exceptions unless in very verbose debug mode (#1088, 13ca44f)
  • refactor(cli): consolidate entrypoints into the module execute file
  • cmd-version: Fix --as-prerelease when no commit change from last full release (#1076, 3b7b772)

  • changelog: Fix raw-inline pattern replacement in convert_md_to_rst filter (2dc70a6)

  • release-notes: Add context variable shorthand ctx like docs claim & changelog has (d618d83)

  • parser-emoji: Enable the default bump level option (bc27995)

  • changelog: Ignore commit exclusion when a commit causes a version bump (e8f886e)

  • parser-angular: Change Fixes commit type heading to Bug Fixes (#1064, 09e3a4d)

  • test(fixtures): update expected changelog heading to Bug Fixes

  • test(unit): update expected changelog heading to Bug Fixes

  • changelog: Prevent custom template errors when components are in hidden folders (#1060, a7614b0)

  • config: Handle branch match regex errors gracefully (#1054, 4d12251)

prevents stacktrace error when user provided regex for a branch name match is invalid. Translates most common failure of a plain wildcard * character to the implied proper regex

  • version-cmd: Improve version_variables flexibility w/ quotes (ie. json, yaml, etc) (#1028, 156915c)
  • fix(version-cmd): increase version_variable flexibility with quotations (ie. json, yaml, etc)

Previously json would not work due to the key being wrapped in quotes, yaml also has issues when it does not usually use quotes. The regex we created originally only wrapped the version to be replaced in quotes but now both the key and version can optionally be wrapped in different kind of quotations.

Resolves: python-semantic-release#601, python-semantic-release#706, python-semantic-release#962, python-semantic-release#1026

  • docs(configuration): add clarity to version_variables usage & limitations

Ref: python-semantic-release#941

  • fix(version-cmd): ensure version_variables do not match partial variable names

  • build(deps-test): add PyYAML as a test dependency

  • test(fixtures): refactor location of fixture for global use of cli runner

  • test(stamp-version): add test cases to stamp json, python, & yaml files

  • config: Fix path traversal detection for windows compatibility (#1014, 16e6daa)

The original implementation of the path traversal detection expected that resolve()
works the same on windows as it does with Linux/Mac. Windows requires the folder paths
to exist to be resolved and that is not the case when the template_dir is not being
used.

Resolves: python-semantic-release#994

  • Provide context.history global in release notes templates (#1005, 5bd91b4)
  • fix(release-notes): provide context.history global in release note templates

Temporarily return the context.history variable to release notes generation
as many users are using it in their release documentation. It was never intended
to be provided and will be removed in the future.

context was removed in v9.8.3 during a refactor and condensing of changelog
and release notes functionality.

Resolves: python-semantic-release#984

  • fix(release-notes): fix noop-changelog to print raw release notes

Some markdown sequences can be interpreted as ansi escape sequences which dilute
debugging of release note templates by the user. This change ensures the raw
content is displayed to the console as expected.

  • version-cmd: Resolve build command execution in powershell (#980, 32c8e70)

Fixes the command line option for passing a shell command to Powershell. Also included a similar shell detection result for pwsh (Powershell Core)

  • Enable --print-last-released* when in detached head or non-release branch (#926, 782c0a6)
  • test(version-cmd): add tests to print when detached or non-release branch

ref: python-semantic-release#900

  • fix(version-cmd): drop branch restriction for --print-last-released* opts

Resolves: python-semantic-release#900

  • changelog-cmd: Remove usage strings when error occured (348a51d)

Resolves: python-semantic-release#810

  • publish-cmd: Remove usage strings when error occured (afbb187)

Resolves: python-semantic-release#810

  • config: Prevent path traversal manipulation of target changelog location (43e35d0)

  • version-cmd: Remove usage strings when error occurred (a7c17c7)

Resolves: python-semantic-release#810

  • publish-cmd: Prevent error when provided tag does not exist locally (16afbbb)

  • config: Prevent path traversal manipulation of target changelog location (3eb3dba)

  • changelog-cmd: Render default changelog when user template directory exist but is empty (bded8de)

  • parser: Strip DOS carriage-returns in commits (#956, 0b005df)

The default template can result in mixed (UNIX / DOS style) carriage returns in the generated changelog. Use a string replace in the commit parser to strip the DOS CRs ("\r"). This is only needed in the case when we are not byte decoding.

Fixes python-semantic-release#955

  • templates: Suppress extra newlines in default changelog (#954, 7b0079b)

Suppress extra newlines in default generated changelog output

  • fix(version-cmd): pass windows specific env vars to build cmd when on windows

  • test(version-cmd): extend build cmd tests to include windows vars

  • docs(configuration): define windows specific env vars for build cmd

  • refactor(version-cmd): only add windows vars when windows is detected


Co-authored-by: Juan Cruz Mencia Naranjo [email protected]

  • Enabled prelease-token parameter in github action (#929, 1bb26b0)

  • Enable user configuration of build_command env vars (#925, 6b5b271)

  • test(version): add test of user defined env variables in build command

ref: python-semantic-release#922

  • fix(version): enable user config of build_command env variables

Resolves: python-semantic-release#922

  • docs(configuration): document build_command_env configuration option

  • gha: Fix missing git_committer_* definition in action (#919, ccef9d8)

Resolves: python-semantic-release#918

  • gha: Add missing tag option to GitHub Action definition (#908, 6b24288)

Resolves: python-semantic-release#906

  • parser-custom: Gracefully handle custom parser import errors (67f6038)

  • Correct version --prerelease use & enable --as-prerelease (#647, 2acb5ac)

  • test(version): add validation of --as-prerelease and --prerelease opts

  • fix(version-cmd): correct --prerelease use

Prior to this change, --prerelease performed the role of converting whichever forced version into a prerelease version declaration, which was an unintentional breaking change to the CLI compared to v7.

--prerelease now forces the next version to increment the prerelease revision, which makes it consistent with --patch, --minor and --major. Temporarily disabled the ability to force a prerelease.

Resolves: python-semantic-release#639

  • feat(version-cmd): add --as-prerelease option to force the next version to be a prerelease

Prior to this change, --prerelease performed the role that --as-prerelease now does, which was an unintentional breaking change to the CLI compared to v7.

--prerelease is used to force the next version to increment the prerelease revision, which makes it consistent with --patch, --minor and --major, while --as-prerelease forces for the next version to be converted to a prerelease version type before it is applied to the project regardless of the bump level.

Resolves: python-semantic-release#639

  • docs(commands): update version command options definition about prereleases

Co-authored-by: codejedi365 [email protected]

  • hvcs: Allow insecure http connections if configured (#886, db13438)
  • fix(gitlab): allow insecure http connections if configured

  • test(hvcs-gitlab): fix tests for clarity & insecure urls

  • test(conftest): refactor netrc generation into common fixture

  • refactor(hvcsbase): remove extrenous non-common functionality

  • fix(gitea): allow insecure http connections if configured

  • test(hvcs-gitea): fix tests for clarity & insecure urls

  • refactor(gitlab): adjust init function signature

  • fix(github): allow insecure http connections if configured

  • test(hvcs-github): fix tests for clarity & insecure urls

  • fix(bitbucket): allow insecure http connections if configured

  • test(hvcs-bitbucket): fix tests for clarity & insecure urls

  • fix(config): add flag to allow insecure connections

  • fix(version-cmd): handle HTTP exceptions more gracefully

  • style(hvcs): resolve typing issues & mimetype executions

  • test(cli-config): adapt default token test for env resolution

  • test(changelog-cmd): isolate env & correct the expected api url

  • test(fixtures): adapt repo builder for new hvcs init() signature

  • style: update syntax for 3.8 compatiblity & formatting

  • docs(configuration): update remote settings section with missing values

Resolves: python-semantic-release#868

  • style(docs): improve configuration & api readability
  • hvcs: Prevent double url schemes urls in changelog (#676, 5cfdb24)
  • fix(hvcs): prevent double protocol scheme urls in changelogs

Due to a typo and conditional stripping of the url scheme the
hvcs_domain and hvcs_api_domain values would contain protocol schemes
when a user specified one but the defaults would not. It would cause
the api_url and remote_url to end up as "https://https://domain.com"

  • fix(bitbucket): correct url parsing & prevent double url schemes

  • fix(gitea): correct url parsing & prevent double url schemes

  • fix(github): correct url parsing & prevent double url schemes

  • fix(gitlab): correct url parsing & prevent double url schemes

  • test(hvcs): ensure api domains are derived correctly


Co-authored-by: codejedi365 [email protected]

  • gh-actions-output: Fixed trailing newline to match GITHUB_OUTPUT format (#885, 2c7b6ec)
  • test(gh-actions-output): fix unit tests to manage proper whitespace

tests were adjusted for clarity and to replicate error detailed in python-semantic-release#884.

  • fix(gh-actions-output): fixed trailing newline to match GITHUB_OUTPUT format

Resolves: python-semantic-release#884

  • cli-version: Change implementation to only push the tag we generated (8a9da4f)

Restricts the git push command to only push the explicit tag we created which will eliminate the possibility of pushing another tag that could cause an error.

Resolves: python-semantic-release#803

  • algorithm: Handle merge-base errors gracefully (4c998b7)

Merge-base errors generally occur from a shallow clone that is primarily used by CI environments and will cause PSR to explode prior to this change. Now it exits with an appropriate error.

Resolves: python-semantic-release#724

  • cli: Enable subcommand help even if config is invalid (91d221a)

Refactors configuration loading to use lazy loading by subcommands triggered by the property access of the runtime_ctx object. Resolves the issues when running --help on subcommands when a configuration is invalid

Resolves: python-semantic-release#840

  • parse-git-url: Handle urls with url-safe special characters (27cd93a)

  • changelog-generation: Fix incorrect release timezone determination (f802446)

  • changelog: Make sure default templates render ending in 1 newline (0b4a45e)

  • parse_git_url: Fix bad url with dash (1c25b8e)

  • Remove unofficial environment variables (a5168e4)

  • algorithm: Correct bfs to not abort on previously visited node (02df305)

  • util: Properly parse windows line-endings in commit messages (70193ba)

Due to windows line-endings \r\n, it would improperly split the commit description (it failed to split at all) and cause detection of Breaking changes to fail. The breaking changes regular expression looks to the start of the line for the proper syntax.

Resolves: python-semantic-release#820

  • config: Set commit parser opt defaults based on parser choice (#782, 9c594fb)

  • Drop support for Python 3.7 (#828, ad086f5)

  • lint: Correct linter errors (c9556b0)

  • cli-generate-config: Ensure configuration types are always toml parsable (#785, 758e649)

  • cli: Gracefully output configuration validation errors (#772, e8c9d51)

  • test(fixtures): update example project workflow & add config modifier

  • test(cli-main): add test for raw config validation error

  • fix(cli): gracefully output configuration validation errors

  • config: Gracefully fail when repo is in a detached HEAD state (#765, ac4f9aa)
  • fix(config): cleanly handle repository in detached HEAD state

  • test(cli-main): add detached head cli test

  • cmd-version: Handle committing of git-ignored file gracefully (#764, ea89fa7)
  • fix(version): only commit non git-ignored files during version commit

  • test(version): set version file as ignored file

Tweaks tests to use one committed change file and the version file as an ignored change file. This allows us to verify that our commit mechanism does not crash if a file that is changed is ignored by user

GitHub.upload_asset now raises ValueError instead of requests.HTTPError

  • Error when running build command on windows systems (#732, 2553657)

  • Attribute error when logging non-strings (#711, 75e6e48)

  • Dynamic_import() import path split (#686, 1007a06)

  • Use correct upload url for github (#661, 8a515ca)

Co-authored-by: github-actions [email protected]

  • publish: Improve error message when no tags found (#683, bdc06ea)

  • Don't warn about vcs token if ignore_token_for_push is true. (#670, f1a54a6)

  • fix: don't warn about vcs token if ignore_token_for_push is true.

  • docs: password should be token.

  • changelog: Use version as semver tag by default (#653, 5984c77)

  • Skip unparseable versions when calculating next version (#649, 88f25ea)

  • Handle missing configuration (#644, f15753c)

  • Invalid version in Git history should not cause a release failure (#632, 254430b)

  • Relax invoke dependency constraint (18ea200)

  • Consider empty commits (#608, 6f2e890)

  • Docker build fails installing git (#605, 9e3eb97)

git was installed from bullseye-backports, but base image is referencing latest python:3.10 since bookworm was recently released, this now points at bookworm and installing the backport of git is actually trying to downgrade, resulting in this error:

E: Packages were downgraded and -y was used without --allow-downgrades.

ERROR: failed to solve: process "/bin/sh -c echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list; apt-get update; apt-get install -y git/bullseye-backports" did not complete successfully: exit code: 100

  • Generate markdown linter compliant changelog headers & lists (#597, cc87400)

In python-semantic-release#594, I missed that there are 2 places where the version header is formatted

  • Open all files with explicit utf-8 encoding (#596, cb71f35)

  • Generate markdown linter compliant changelog headers & lists (#594, 9d9d403)

Add an extra new line after each header and between sections to fix 2 markdownlint errors for changelogs generated by this package

  • Update docs and default config for gitmoji changes (#590, 192da6e)
  • fix: update docs and default config for gitmoji changes

PR python-semantic-release#582 updated to the latest Gitmojis release however the documentation and default config options still referenced old and unsupported Gitmojis.

  • fix: update sphinx dep

I could only build the documentation locally by updating Sphinx to the latest 1.x version.

Co-authored-by: Ondrej Winter [email protected]

  • Update Gitmojis according to official node module (#582, 806fcfa)

  • Trim emojis from config (#583, 02902f7)

  • Inconsistent versioning between print-version and publish (#524, 17d60e9)

  • action: Mark container fs as safe for git (#552, 2a55f68)

See actions/runner-images#6775 (comment) and actions/runner-images#6775 (comment)

  • Changelog release commit search logic (#530, efb3410)
  • Fixes changelog release commit search logic

Running semantic-release changelog currently fails to identify "the last commit in [a] release" because the compared commit messages have superfluous whitespace. Likely related to the issue causing: python-semantic-release#490

  • Removes a couple of extra strip()s.
  • Bump Dockerfile to use Python 3.10 image (#536, 8f2185d)

Fixes python-semantic-release#533

Co-authored-by: Bernard Cooke [email protected]

  • Fix mypy errors for publish (b40dd48)

  • Formatting in docs (2e8227a)

  • Update documentaton (5cbdad2)

  • action: Fix environment variable names (3c66218)

  • Fix changelog generation in tag-mode (#171, 482a62e)

  • Corrections for deprecation warnings (#505, d47afb6)

  • Account for trailing newlines in commit messages (#495, 111b151)

Fixes python-semantic-release#490

  • Use commit_subject when searching for release commits (#488, 3849ed9)

Co-authored-by: Dzmitry Ryzhykau [email protected]

  • Add better handling of missing changelog placeholder (e7a0e81)

There is still one case where we don't add it, but in those corner cases it would be better to do it manually than to make it mangled.

Fixes python-semantic-release#454

  • Add repo=None when not in git repo (40be804)

Fixes python-semantic-release#422

  • Update git email in action (0ece6f2)

Fixes python-semantic-release#473

  • 🐛 fix get_current_release_version for tag_only version_source (cad09be)

  • Declare additional_options as action inputs (#481, cb5d8c7)

  • Don't use commit_subject for tag pattern matching (#480, ac3f11e)

  • Allow empty additional options (#479, c9b2514)

  • Ignore dependency version bumps when parsing version from commit logs (#476, 51bcb78)

  • Allow changing prerelease tag using CLI flags (#466, 395bf4f)

Delay construction of version and release patterns until runtime. This will allow to use non-default prerelease tag.

Co-authored-by: Dzmitry Ryzhykau [email protected]

  • publish: Get version bump for current release (#467, dd26888)

Replicate the behavior of "version" command in version calculation.

Co-authored-by: Dzmitry Ryzhykau [email protected]

  • Add packaging module requirement (#469, b99c9fa)

  • Add text for empty ValueError (#461, 733254a)

  • Ensure that assets can be uploaded successfully on custom GitHub servers (#458, 32b516d)

Signed-off-by: Chris Butler [email protected]

  • Ensure should_bump checks against release version if not prerelease (#457, da0606f)

Co-authored-by: Sebastian Seith [email protected]

  • Capture correct release version when patch has more than one digit (#448, 426cdc7)

  • Fix and refactor prerelease (#435, 94c9494)

  • Fix getting current version when version_source=tag_only (#437, b247936)

  • prerelase: Pass prerelease option to get_current_version (#432, aabab0b)

The get_current_version function accepts a prerelease argument which was never passed.

  • fix(gitea): handle list build status response
  • fix(gitea): use form-data for upload_asset
  • Address PR feedback for parser_angular.py (f7bc458)

  • angular_parser_default_level_bump should have plain-english
    settings

  • rename TYPES variable to LONG_TYPE_NAMES

  • Remove invalid repository exception (746b62d)

  • Mypy errors in vcs_helpers (13ca0fe)

  • Skip removing the build folder if it doesn't exist (8e79fdc)

python-semantic-release#391 (comment)

  • Don't use linux commands on windows (#393, 5bcccd2)

  • Fixed ImproperConfig import error (#377, b011a95)

  • Add get_formatted_tag helper instead of hardcoded v-prefix in the git tags (1a354c8)

  • Correct rendering of gitlab issue references (07429ec)

resolves python-semantic-release#358

Co-authored-by: Laercio Barbosa [email protected]

  • Use release-api for gitlab (1ef5cab)

  • Tomlkit should stay at 0.7.0 (769a5f3)

See python-semantic-release#339 (comment)

Build System

  • deps: Bump ruff from 0.3.5 to 0.3.7 (#894, 6bf2849)

  • deps: Update rich requirement from ~=12.5 to ~=13.0 (#877, 4a22a8c)

Updates the requirements on rich to permit the latest version.

Resolves: python-semantic-release#888

Signed-off-by: dependabot[bot] [email protected] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

  • deps: Add click-option-group for grouping exclusive flags (bd892b8)

  • deps: Bump minimum required tomlkit to >=0.11.0 (291aace)

TOMLDocument is missing the unwrap() function in v0.10.2 which causes an AttributeError to occur when attempting to read a the text in pyproject.toml as discovered with python-semantic-release#834

Resolves: python-semantic-release#834

Documentation

  • changelog-templates: Document new mask_initial_release changelog context variable (f294957)

  • configuration: Document new mask_initial_release option usage & effect (3cabcdc)

  • homepage: Fix reference to new ci workflow for test status badge (6760069)

  • changelog-templates: Fix api class reference links (7a5bdf2)

  • changelog-templates: Add linked_merge_request field to examples (d4376bc)

  • commit-parsing: Add linked_merge_request field to Parsed Commit definition (ca61889)

  • contributing: Update local testing instructions (74f03d4)

  • configuration: Add deprecation message for the tag parser (a83b7e4)

  • commit-parsers: Add deprecation message for the tag parser (af94540)

  • github-actions: Update primary example with workflow sha controlled pipeline (14f04df)

  • github-actions: Clarify & consolidate GitHub Actions usage docs (#1011, 2135c68)

Resolves: python-semantic-release#907

  • chore(scripts): remove non-existant file from version bump script

  • docs(automatic-releases): drop extrenous github push configuration

  • docs(homepage): remove link to old github config & update token scope config

  • docs(github-actions): expand descriptions & clarity of actions configs

  • docs(github-actions): add configuration & description of publish action

  • docs(github-actions): revert removal of namespace prefix from examples

  • Update docstrings to resolve sphinx failures (#1030, d84efc7)

set ignore-module-all for autodoc_default_options to resolve some Sphinx errors about duplicate / ambiguous references sphinx-doc/sphinx#4961 (comment)

Standardize some non-standard (Google-ish) docstrings to Sphinx format, to avoid ruff and Sphinx arguing about underline length.

Fix indents and other minor whitespace / formatting changes.

Fixes python-semantic-release#1029

  • configuration: Update build_command env table for windows to use all capital vars (0e8451c)

  • github-actions: Update version in examples to latest version (3c894ea)

  • Use pinned version for GHA examples (#1004, 5fdf761)

  • docs(github-actions): use pinned version for GHA examples

Fixes python-semantic-release#1003

  • chore(scripts): add auto version bump to non dynamic docs text (i.e. code snippets)

  • docs(github-actions): adjust formatting & version warning in code snippets

  • style(docs-github-actions): adjust formatting for readability


Co-authored-by: codejedi365 [email protected]

  • configuration: Fix build_command_env table rendering (#996, a5eff0b)

  • changelog: Clarify description of the default changelog generation process (399fa65)

  • configuration: Clarify changelog_file vs template_dir option usage (a7199c8)

Provided additional description that warns about the mutually-exclusive nature of the changelog_file option and the template_dir option.

Resolves: python-semantic-release#983

  • configuration: Correct GHA parameter name for commit email (#981, ce9ffdb)

git_committer_name was repeated; replace one instance of it with git_committer_email

  • migration-v8: Update version references in migration instructions (#938, d6ba16a)

  • configuration: Clarify TOC & alphabetize configuration descriptions (19add16)

  • configuration: Clarify TOC & standardize heading links (3a41995)

  • configuration: Add description of build command available env variables (c882dc6)

  • configuration: Clarify the major_on_zero configuration option (f7753cd)

  • configuration: Add description of allow-zero-version configuration option (4028f83)

  • Add bitbucket to token table (56f146d)

  • Add bitbucket authentication (b78a387)

  • Fix typo (b240e12)

  • Remove duplicate note in configuration.rst (#807, fb6f243)

  • contributing: Add docs-build, testing conf, & build instructions (#787, 011b072)

  • configuration: Change defaults definition of token default to table (#786, df1df0d)

  • Add note on default envvar behaviour (#780, 0b07cae)

  • Minor correction to commit-parsing documentation (#777, 245e878)

  • configuration: Adjust wording and improve clarity (#766, 6b2fc8c)

  • docs(configuration): fix typo in text

  • docs(configuration): adjust wording and improve clarity

  • migration: Fix comments about publish command (#747, 90380d7)

  • Add PYTHONPATH mention for commit parser (3284258)

  • Update project urls (#715, 5fd5485)

  • Fix typos (#708, 2698b0e)

  • Fix typo missing 's' in version_variable[s] in configuration.rst (#668, 879186a)

  • Clarify usage of assets config option (#655, efa2b30)

  • Add Python 3.11 to classifiers in metadata (#651, 5a32a24)

  • Correct version_toml example in migrating_from_v7.rst (#641, 325d5e0)

  • Clarify v8 breaking changes in GitHub action inputs (#643, cda050c)

  • Better description for tag_format usage (2129b72)

  • Reduce readthedocs formats and add entries to migration from v7 guide (9b6ddfe)

  • migration: Fix hyperlink (#631, 5fbd52d)

  • Update broken badge and add links (#591, 0c23447)

The "Test Status" badge was updated to address a recent breaking change in the GitHub actions API. All the badges updated to add links to the appropriate resources for end-user convenience.

In order to avoid 'Repository not found: relekang/python-semantic-release.'

  • Spelling and grammar in travis.rst (#556, 3a76e9d)

  • spelling

  • subject-verb agreement

  • remove verbiage

Signed-off-by: Vladislav Doster [email protected]

  • Grammar in docs/troubleshooting.rst (#557, bbe754a)

  • change contraction to a possessive pronoun

Signed-off-by: Vladislav Doster [email protected]

Previously: https://i.imgur.com/XWFhG7a.png

  • Correct spelling mistakes (#504, 3717e0d)

  • Correct documented default behaviour for commit_version_number (#497, ffae2dc)

  • Add example for pyproject.toml (2a4b8af)

  • Document tag_commit (b631ca0)

Fixes python-semantic-release#410

  • Clean typos and add section for repository upload (1efa18a)

Add more details and external links

  • parser: Documentation for scipy-parser (45ee34a)

  • Clarify second argument of ParsedCommit (086ddc2)

  • Update trove classifiers to reflect supported versions (#344, 7578004)

  • Recommend setting a concurrency group for GitHub Actions (34b0735)

Features

  • context: Add mask_initial_release setting to changelog context (6f2ee39)

  • configuration: Add changelog.default_templates.mask_initial_release option (595a70b)

  • release-notes: Define first release w/o change descriptions in default template (83167a3)

  • changelog: Define first release w/o change descriptions for default RST template (e30c94b)

  • changelog: Define first release w/o change descriptions for default MD template (fa89dec)

  • changelog: Add md to rst conversion for markdown inline links (cb2af1f)

  • changelog-md: Add markdown inline link format macro (c6d8211)

  • changelogs: Prefix scopes on commit descriptions in default template (#1093, 560fd2c)

  • test(changelog): update default changelog unit tests to handle commit scope

  • test(release-notes): update default release notes unit tests to handle commit scope

  • test(fixtures): update changelog generator fixture to handle scope additions

  • test(cmd-version): update implementation for test resiliency

  • feat(changelog-md): prefix scopes on commit descriptions in Markdown changelog template

  • feat(changelog-rst): prefix scopes on commit descriptions in ReStructuredText template

  • changelog: Add PR/MR url linking to default reStructuredText template (5f018d6)

Resolves: python-semantic-release#924, python-semantic-release#953

  • changelog: Add PR/MR url linking to default Markdown changelog (cd8d131)

Resolves: python-semantic-release#924, python-semantic-release#953

  • parser-scipy: Automatically parse PR/MR numbers from subject lines in commits (2b3f738)

  • parser-emoji: Automatically parse PR/MR numbers from subject lines in commits (bca9909)

  • parser-angular: Automatically parse PR/MR numbers from subject lines in commits (2ac798f)

  • parsed-commit: Add linked merge requests list to the ParsedCommit object (9a91062)

  • changelog: Add autofit_text_width filter to template environment (#1062, 83e4b86)

This change adds an equivalent style formatter that can apply a text alignment to a maximum width and also maintain an indent over paragraphs of text

  • docs(changelog-templates): add definition & usage of autofit_text_width template filter

  • test(changelog-context): add test cases to check autofit_text_width filter use

  • changelog: Add default changelog template in reStructuredText format (#1055, c2e8831)
  • test(fixtures): update repo generation to create rst & md changelogs

  • test(release-history): refactor fragile test to utilize repo fixture definitions

  • test(changelog-cmd): update tests to evaluate rst changelog generation & updates

  • test(version-cmd): update tests to evaluate rst changelog generation & updates

  • test(version-cmd): update test code to match new commit definition functions

  • test(config): add test to validate insertion_flag default determination

  • feat(changelog): add convert_md_to_rst filter to changelog environment

  • feat(changelog): add default changelog in re-structured text format

This change adds the templates to create an equivalent CHANGELOG.RST file in angular changelog style. It can be enabled via the output_format configuration setting.

Resolves: python-semantic-release#399

  • feat(config): enable target changelog filename to trigger RST output format

Resolves: python-semantic-release#399

  • feat(config): enable default changelog.insertion_flag based on output format

  • refactor(config): move changelog_file setting under changelog.default_templates

This change adds a secondary changelog_file setting under the default_templates section while deprecating the top level one. Since this is not intended to be a breaking change we provided a warning message and compatibility code to pass along the current changelog_file value to the new setting location while giving the user a notification to update before the next version.

  • fix(changelog): correct spacing for default markdown template during updates

  • docs(configuration): update details of insertion_flag's dynamic defaults with rst

  • docs(configuration): update output_format description for reStructuredText support

  • docs(configuration): update changelog_file with deprecation notice of setting relocation

  • docs(changelog): clarify the convert_md_to_rst filter added to the template environment

  • docs(changelog): increase detail about configuration options of default changelog creation

  • changelog: Modify changelog template to support changelog updates (#1045, c18c245)
  • feat(changelog): add read_file function to changelog template context

This feature adds a filter that will enable jinja templates to read a file from the repository into memory to then use as output within the template. The primary use for this is to read in a previous changelog file which then the template can give the illusion of insertion as it re-writes the entire file.

  • feat(changelog): add changelog_mode to changelog template context

Adds a flag that can be passed to the templating environment to allow for triggering an update mode of a changelog versions an initialization mode. The usage is up to the template developer but for PSR it is used to handle changelog generation vs changelog updating.

  • feat(changelog): add prev_changelog_file to changelog template context

This adds a string that represents a filename to a previous changelog file which can be read from inside the template context. The primary use is for enabling the updating of a changelog through jinja templating.

  • feat(changelog): add changelog_insertion_flag to changelog template context

This adds a customizable string to the jinja templating context which allows users to use the PSR configuration to pass a custom insertion flag into the templating context. This is intended for use with initializing a changelog and then updating it from that point forward.

  • feat(changelog): add shorthand ctx variable to changelog template env

  • refactor(changelog): change recursive render to not use file streaming

It would be nice to maintain file streaming for better memory usage but it prevents the ability to read the file contents previously from within the template which is a desire in order to insert into a previous changelog. In this case, the memory usage is likely not a problem for large text files.

  • fix(config): prevent jinja from autoescaping markdown content by default

Since this project is generally rendering non-html content such as RST or MD, change the default of the jinja autoescape parameter to false instead of true. When it was true, it would automatically convert any & ampersands to its htmlentity equivalent &amp; which is completely unnecessary and unreadable in non-html documents.

  • docs(configuration): update changelog.environment.autoescape default to false to match code

  • docs(configuration): standardize all true/false to lowercase ensuring toml-compatibility

  • feat(config): add changelog.mode as configuration option

  • feat(config): add changelog.insertion_flag as configuration option

  • refactor(config): use changelog.changelog_file as previous changelog file for target for update

  • style(config): alphabetize changelog configuration options

  • docs(configuration): add changelog.mode and changelog.insertion_flag config definitions

  • fix(changelog): adjust angular heading names for readability

  • feat(changelog): modify changelog template to support changelog updates

By popular demand, the desire to only prepend new information to the changelog is now possible given the changelog.mode = update configuration option.

Resolves: python-semantic-release#858, python-semantic-release#722

  • refactor(errors): add new generic internal error for tragic improbable flaws

  • fix(changelog): ensure changelog templates can handle complex directory includes

  • feat(config): add changelog.default_templates.output_format config option

  • fix(changelog): only render user templates when files exist

This change ensures that we will use our default even when the user only overrides the release notes template. It also must have jinja templates in the folder otherwise we will render the default changelog.

  • refactor(changelog): enable default changelog rendering of multiple template parts

  • refactor(changelog): change rendering of default release notes to new template structure

  • refactor(context): use pathlib instead of context manager to read file

  • test(fixtures): update changelog generator format & angular heading names

  • test(angular): adjust test of commit type to section header

  • test(changelog): update make changelog context function call

  • test(release-notes): update test related to release notes generation

  • test(fixtures): add processing to filter out repo definitions for partial changelogs

  • test(fixtures): update repo generators to update changelogs w/ every version

  • test(fixtures): slow down repo generators to prevent git failures from same timestamps

  • test(fixtures): update changelog generator to include insertion flag

  • refactor(changelog): fix template to handle update when no releases exist

  • refactor(changelog): adjust template to use improved release object

  • refactor(changelog): improve resilence & non-existant initial changelog

  • style(changelog-templates): maintain 2-spaces indentation throughout jinja templates

  • refactor(changelog): ensure cross-platform template includes with jinja compatibility

  • test(changelog-cmd): add tests to evaluate variations of the changelog update mode

  • test(version-cmd): add tests to evaluate variations of the changelog update mode

  • refactor(release-notes): normalize line endings to universal newlines & always end with newline

  • refactor(changelog): ensure default changelog renders w/ universal newlines & writes as os-specific

  • test(changelog): update changelog testing implementation to be newline aware

  • test: update tests to use cross-platform newlines where appropriate

  • docs(changelog-templates): improve detail & describe new changelog.mode="update"

  • docs(configuration): mark version of configuration setting introduction

  • docs(homepage): update custom changelog reference

  • refactor(changelog): adjust read_file filter to read file as os-newline aware

  • refactor(changelog): apply forced universal newline normalizer on default changelog

  • test(changelog): adjust implementation to consistently work on windows

  • test(version): adjust implementation to consistently work on windows

  • refactor(changelog-template): only add insertion flag if in update mode

  • test(changelog): adjust test to handle changelog regeneration in init mode

  • refactor(changelog-templates): adjust init template to clean up extra newlines

  • test(changelog): adjust expected output after cleaned up newlines

  • docs(configuration): define the new changelog.default_templates.output_format option

  • github-actions: Add an action build directive to toggle the --skip-build option (#1044, 26597e2)
  • docs(commands): update definition of the version commands --skip-build option

  • docs(github-actions): add description of the build input directive

  • github-actions: Add is_prerelease output to the version action (#1038, 6a5d35d)
  • test(github-actions): add test to ensure is_prerelease is a action output

  • docs(github-actions): add description of new is_prerelease output for version action

  • Extend gitlab to edit a previous release if exists (#934, 23e02b9)
  • style(hvcs-github): update function docstrings for params

  • feat(hvcs-gitlab): enable gitlab to edit a previous release if found

  • fix(hvcs-gitlab): add tag message to release creation

  • fix(gitlab): adjust release name to mirror other hvcs release names

  • refactor(gitlab): consolidate & simplify usage of gitlab client

  • test(gitlab): neuter test cases that used the internet & add new tests

  • refactor(gitlab): handle errors in release retrieval gracefully

  • refactor(gitlab): update release notes editing implementation


Co-authored-by: bdorsey [email protected]

  • gha: Configure ssh signed tags in GitHub Action (#937, dfb76b9)

Resolves: python-semantic-release#936

  • version-cmd: Add toggle of --no-verify option to git commit (#927, 1de6f78)
  • test(version-cmd): add test w/ failing pre-commit hook--preventing version commit

  • feat(version-cmd): add toggle of --no-verify option to git commit

This commit adds a configuration option that toggles the addition of --no-verify command line switch on git commit operations that are run with the version command.

  • docs(configuration): add no_git_verify description to the configuration page

Co-authored-by: bdorsey [email protected]

  • version-cmd: Pass NEW_VERSION & useful env vars to build command (ee6b246)

  • Changelog filters are specialized per vcs type (#890, 76ed593)

  • test(github): sync pr url expectation with GitHub api documentation

  • fix(github): correct changelog filter for pull request urls

  • refactor(hvcs-base): change to an abstract class & simplify interface

  • refactor(remote-hvcs-base): extend the base abstract class with common remote base class

  • refactor(github): adapt to new abstract base class

  • refactor(gitea): adapt to new abstract base class

  • refactor(gitlab): adapt to new abstract base class

  • refactor(bitbucket): adapt to new abstract base class

  • refactor(cmds): prevent hvcs from executing if not remote hosted vcs

  • feat(changelog): changelog filters are hvcs focused

  • test(hvcs): add validation for issue_url generation

  • feat(changelog-github): add issue url filter to changelog context

  • feat(changelog-gitea): add issue url filter to changelog context

  • refactor(cmd-version): consolidate asset uploads with release creation

  • style: resolve ruff errors

  • feat(changelog-context): add flag to jinja env for which hvcs is available

  • test(changelog-context): demonstrate per hvcs filters upon render

  • docs(changelog-context): explain new hvcs specific context filters

  • refactor(config): adjust default token resolution w/ subclasses

  • Extend support to on-prem GitHub Enterprise Server (#896, 4fcb737)
  • test(github): adjust init test to match the Enterprise Server api url

  • feat(github): extend support to on-prem GitHub Enterprise Server

Resolves: python-semantic-release#895

  • gitea: Derives gitea api domain from base domain when unspecified (#675, 2ee3f8a)
  • test(gitea): add test of custom server path & custom api domain

  • feat(gitea): derives gitea api domain from base domain when unspecified

  • refactor(hvcs-gitea): uniformly handle protocol prefixes


Co-authored-by: codejedi365 [email protected]

  • cmd-version: Changelog available to bundle (#779, 37fdb28)
  • test(util): fix overlooked file differences in folder comparison

  • test(version): tracked changelog as changed file on version create

Removes the temporary release_notes hack to prevent CHANGELOG generation on execution of version command. Now that it is implemented we can remove the fixture to properly pass the tests.

  • feat(cmd-version): create changelog prior to build enabling doc bundling
  • version-config: Add option to disable 0.x.x versions (dedb3b7)

  • version: Add new version print flags to display the last released version and tag (814240c)

  • Add bitbucket hvcs (bbbbfeb)

  • config: Enable default environment token per hvcs (#774, 26528eb)

  • utils: Expand parsable valid git remote url formats (#771, cf75f23)

Git remote url parsing now supports additional formats (ssh, https, file, git)

  • Allow template directories to contain a '.' at the top-level (#762, 07b232a)

  • cmd-version: Add --tag/--no-tag option to version command (#752, de6b9ad)

  • fix(version): separate push tags from commit push when not committing changes

  • feat(version): add --no-tag option to turn off tag creation

  • test(version): add test for --tag option & --no-tag/commit

  • docs(commands): update version subcommand options

  • action: Use composite action for semantic release (#692, 4648d87)

Co-authored-by: Bernard Cooke [email protected]

  • Allow user customization of release notes template (#736, 94a1311)

Signed-off-by: Bryant Finney [email protected]

Co-authored-by: Johan [email protected] Co-authored-by: U-NEO\johan [email protected]

  • fix: correct Dockerfile CLI command and GHA fetch

  • fix: resolve branch checkout logic in GHA

  • fix: remove commit amending behaviour

this was not working when there were no source code changes to be made, as it lead to attempting to amend a HEAD commit that wasn't produced by PSR

  • 8.0.0-alpha.1

Automatically generated by python-semantic-release

  • fix: correct logic for generating release notes (python-semantic-release#550)

  • fix: cleanup comments and unused logic

  • fix(action): mark container fs as safe for git to operate on

  • style: beautify 49080c5

  • fix(action): quotation for git config command

  • 8.0.0-alpha.2

Automatically generated by python-semantic-release

  • fix: resolve bug in changelog logic, enable upload to pypi

  • 8.0.0-alpha.3

Automatically generated by python-semantic-release

  • test: add tests for ReleaseHistory.release

  • fix: resolve loss of tag_format configuration

  • 8.0.0-alpha.4

Automatically generated by python-semantic-release

  • feat: various improvements

  • Added sorting to test parameterisation, so that pytest-xdist works again - dramatic speedup for testing * Reworked the CI verification code so it's a bit prettier * Added more testing for the version CLI command, and split some logic out of the command itself * Removed a redundant double-regex match in VersionTranslator and Version, for some speedup

  • chore(test): proper env patching for tests in CI

  • style: beautify bcb27a4

  • refactor!: remove verify-ci command

  • 8.0.0-alpha.5

Automatically generated by python-semantic-release

  • fix(docs): fixup docs and remove reference to dist publication

  • feat!: remove publication of dists to artefact repository

  • feat: rename 'upload' configuration section to 'publish'

  • feat!: removed build status checking

  • feat: add GitHub Actions output

  • fix(action): remove default for 'force'

  • fix(ci): different workflow for v8

  • fix(action): correct input parsing

  • fix: correct handling of build commands

  • feat: make it easier to access commit messages in ParsedCommits

  • fix: make additional attributes available for template authors

  • fix: add logging for token auth, use token for push

  • ci: add verbosity

  • fix: caching for repo owner and name

  • ci: contents permission for workflow

  • 8.0.0-alpha.6

Automatically generated by python-semantic-release

  • docs: update docs with additional required permissions

  • feat: add option to specify tag to publish to in publish command

  • feat: add Strict Mode

  • docs: convert to Furo theme

  • feat: add --skip-build option

  • 8.0.0-alpha.7

Automatically generated by python-semantic-release

  • test: separate command line tests by stdout and stderr

  • ci: pass tag output and conditionally execute publish steps

  • fix: correct assets type in configuration (python-semantic-release#603)

  • change raw config assets type

  • fix: correct assets type-annotation for RuntimeContext


Co-authored-by: Bernard Cooke [email protected]

  • 8.0.0-alpha.8

Automatically generated by python-semantic-release

  • fix: pin Debian version in Dockerfile

  • feat: promote to rc

  • 8.0.0-rc.1

Automatically generated by python-semantic-release

  • ci: fix conditionals in workflow and update documentation

  • ci: correct conditionals

  • fix: only call Github Action output callback once defaults are set

  • 8.0.0-rc.2

Automatically generated by python-semantic-release

  • fix: create_or_update_release for Gitlab hvcs

  • ci: remove separate v8 workflow

  • chore: tweak issue templates

  • chore: bump docs dependencies

  • 8.0.0-rc.3

Automatically generated by python-semantic-release

  • fix(deps): add types-click, and downgrade sphinx/furo for 3.7

  • 8.0.0-rc.4

Automatically generated by python-semantic-release

Co-authored-by: Micael Jarniac [email protected]


Co-authored-by: Johan [email protected] Co-authored-by: U-NEO\johan [email protected] Co-authored-by: semantic-release Co-authored-by: github-actions [email protected] Co-authored-by: smeng9 [email protected] Co-authored-by: Micael Jarniac [email protected]

  • Add option to only parse commits for current working directory (#509, cdf8116)

When running the application from a sub-directory in the VCS, the option use_only_cwd_commits will filter out commits that does not changes the current working directory, similar to running commands like git log -- . in a sub-directory.

  • Add signing options to action (31ad5eb)

  • repository: Add support for TWINE_CERT (#522, d56e85d)

Fixes python-semantic-release#521

  • Update action with configuration options (#518, 4664afe)

Co-authored-by: Kevin Watson [email protected]

  • Add setting for enforcing textual changelog sections (#502, 988437d)

Resolves python-semantic-release#498

Add the use_textual_changelog_sections setting flag for enforcing that changelog section headings will always be regular ASCII when using the Emoji parser.

  • Override repository_url w REPOSITORY_URL env var (#439, cb7578c)

  • Add prerelease-patch and no-prerelease-patch flags for whether to auto-bump prereleases (b4e5b62)

  • Add additional_options input for GitHub Action (#477, aea60e3)

  • Allow using ssh-key to push version while using token to publish to hvcs (#419, 7b2dffa)

  • feat(config): add ignore_token_for_push param

Add ignore_token_for_push parameter that allows using the underlying git authentication mechanism for pushing a new version commit and tags while also using an specified token to upload dists

  • test(config): add test for ignore_token_for_push

Test push_new_version with token while ignore_token_for_push is True and False

  • docs: add documentation for ignore_token_for_push

  • fix(test): override GITHUB_ACTOR env

push_new_version is using GITHUB_ACTOR env var but we did not contemplate in our new tests that actually Github actions running the tests will populate that var and change the test outcome

Now we control the value of that env var and test for it being present or not

  • Add tag_only option for version_source (#436, cf74339)

Fixes python-semantic-release#354

  • chore: add initial todos
  • feat: add prerelease tag option
  • feat: add prerelease cli flag
  • feat: omit_pattern for previouse and current version getters
  • feat: print_version with prerelease bump
  • feat: make print_version prerelease ready
  • feat: move prerelease determination to get_new_version
  • test: improve get_last_version test
  • docs: added basic infos about prereleases
  • feat: add prerelease flag to version and publish
  • feat: remove leftover todos

Co-authored-by: Mario Jäckle [email protected]

  • hvcs: Add gitea support (#412, b7e7936)

  • Include additional changes in release commits (3e34f95)

Add new config keys, pre_commit_command and commit_additional_files, to allow custom file changes alongside the release commits.

  • Support Github Enterprise server (b4e01f1)

  • parser_angular: Allow customization in parser (298eebb)

  • parser_angular_allowed_types controls allowed types

    • defaults stay the same: build, chore, ci, docs, feat, fix, perf, style,
      refactor, test
  • parser_angular_default_level_bump controls the default level to bump the
    version by

    • default stays at 0
  • parser_angular_minor_types controls which types trigger a minor version
    bump

    • default stays at only 'feat'
  • parser_angular_patch_types controls which types trigger a patch version

    • default stays at 'fix' or 'perf'
  • Use gitlab-ci or github actions env vars (8ca8dd4)

return owner and project name from Gitlab/Github environment variables if available

Issue python-semantic-release#363

  • Rewrite Twine adapter for uploading to artifact repositories (cfb20af)

Artifact upload generalised to fully support custom repositories like GitLab. Rewritten to use twine python api instead of running the executable. No-op mode now respected by artifact upload.

  • Allow custom environment variable names (#392, 372cda3)
  • GH_TOKEN can now be customized by setting github_token_var
  • GL_TOKEN can now be customized by setting gitlab_token_var
  • PYPI_PASSWORD can now be customized by setting pypi_pass_var
  • PYPI_TOKEN can now be customized by setting pypi_token_var
  • PYPI_USERNAME can now be customized by setting pypi_user_var
  • feat: custom git tag format support
  • test: add git tag format check
  • docs: add tag_format config option

Performance Improvements

  • parser-scipy: Increase speed & decrease complexity of commit parsing (2b661ed)

  • parser-emoji: Increase speed of commit parsing (2c9c468)

  • parser-angular: Simplify commit parsing type pre-calculation (a86a28c)

  • Improve git history processing for changelog generation (#972, bfda159)

  • perf(changelog): improve git history parser changelog generation

This converts the double for-loop (O(n^2)) down to O(n) using a
lookup table to match the current commit with a known tag rather than
iterating through all the tags of the repository every time.

  • fix(changelog): resolve commit ordering issue when dates are similar
  • algorithm: Simplify logs & use lookup when searching for commit & tag match (3690b95)

  • algorithm: Refactor bfs search to use queue rather than recursion (8b742d3)