Skip to content

when using "my text [ text ]" in commit_message, portion in brackets is ignored #1251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
andreub opened this issue May 23, 2025 · 4 comments

Comments

@andreub
Copy link

andreub commented May 23, 2025

Bug Report

Description

when using the following configuration

[tool.semantic_release]
version_variables = [ "VERSION:__version__" ]
upload_to_pypi = false
commit_message = "{version}\n\nVersion generated by python-semantic-release [ci skip]"

"[ci skip]" is ignored:

Expected behavior

The whole provided commit_message should be included in the commit message

[🛡 NOP]         would have run:
                            GIT_AUTHOR_NAME=semantic-release \
    GIT_AUTHOR_EMAIL=semantic-release \
    GIT_COMMITTER_NAME=semantic-release \
    GIT_COMMITTER_EMAIL=semantic-release \
    git commit -m '6.237.5

            Version generated by python-semantic-release [ci skip]'

Actual behavior

[🛡 NOP]         would have run:
                            GIT_AUTHOR_NAME=semantic-release \
    GIT_AUTHOR_EMAIL=semantic-release \
    GIT_COMMITTER_NAME=semantic-release \
    GIT_COMMITTER_EMAIL=semantic-release \
    git commit -m '6.237.5

            Version generated by python-semantic-release '

Environment

  • **Operating System (w/ version):**MacOS Darwin 24.5.0 Darwin Kernel Version 24.5.0: RELEASE_ARM64_T8112 arm64 arm Darwin
  • Python version: 3.11.4
  • Pip version: 23.1.2
  • Semantic-release version: 9.21.1
  • Build tool (w/ version): None

Configuration

Semantic Release Configuration
[tool.semantic_release]
version_variables = [ "VERSION:__version__" ]
upload_to_pypi = false
commit_message = "{version}\n\nVersion generated by python-semantic-release [ci skip]"
commit_parser = "conventional"

Additional context

@andreub andreub added bug Something isn't working properly triage waiting for initial maintainer review labels May 23, 2025
@andreub
Copy link
Author

andreub commented May 23, 2025

I also tried:

commit_message = "{version}\n\nVersion generated by python-semantic-release [[ci skip]]"

with no luck:

[🛡 NOP]         would have run:
                            GIT_AUTHOR_NAME=semantic-release \
    GIT_AUTHOR_EMAIL=semantic-release \
    GIT_COMMITTER_NAME=semantic-release \
    GIT_COMMITTER_EMAIL=semantic-release \
    git commit -m '6.237.5

            Version generated by python-semantic-release []'

@andreub andreub changed the title when using "my text [ text ]" in commit_message portion brackets is ignored when using "my text [ text ]" in commit_message portion in brackets is ignored May 23, 2025
@andreub andreub changed the title when using "my text [ text ]" in commit_message portion in brackets is ignored when using "my text [ text ]" in commit_message, portion in brackets is ignored May 23, 2025
@codejedi365 codejedi365 added awaiting-reply Waiting for response and removed bug Something isn't working properly triage waiting for initial maintainer review labels May 23, 2025
@codejedi365
Copy link
Contributor

Have you actually tried running the project not in --noop mode? The log is likely misinterpreted by the terminal as an ansi escape code.

If you don't want all the steps to execute and it easily revertable then use:

semantic-release version --no-tag --no-push --skip-build

@andreub
Copy link
Author

andreub commented May 23, 2025

Have you actually tried running the project not in --noop mode? The log is likely misinterpreted by the terminal as an ansi escape code.

If you don't want all the steps to execute and it easily revertable then use:

semantic-release version --no-tag --no-push --skip-build

you are right, it actually works as expected, thanks!

Author: semantic-release <semantic-release>
Date:   Fri May 23 16:12:22 2025 +0200

    6.237.5
    
    Version generated by python-semantic-release [ci skip]

should we still keep the issue open so the --noop mode is fixed to be consistent with the real one?

@codejedi365
Copy link
Contributor

There is probably nothing I can do since I don't do any processing on that output. It's using the rich console formatter on top of the logging mechanism. I can look around for an escape function and apply it to that one log line as it's not intended to have colors. But I might just close it if that doesn't exist.

@codejedi365 codejedi365 removed the awaiting-reply Waiting for response label May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants