Skip to content

bug: No-op mode fails to log any bracket-encased text in commit_message #1251

Closed

Description

@andreub

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

Activity

  1. added
    bug
    triage
    on May 23, 2025
  2. andreub commented on May 23, 2025

    @andreub
    Author

    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 []'
    
  3. 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[/+] on May 23, 2025
  4. 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[/+] on May 23, 2025
  5. added
    awaiting-reply
    and removed
    bug
    triage
    on May 23, 2025
  6. codejedi365 commented on May 23, 2025

    @codejedi365
    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
  7. andreub commented on May 23, 2025

    @andreub
    Author

    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?

  8. codejedi365 commented on May 23, 2025

    @codejedi365
    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.

  9. removed
    awaiting-reply
    on May 23, 2025
  10. added a commit that references this issue on Jun 30, 2025
    7984e7e
  11. added
    bug
    confirmed
    on Jun 30, 2025
  12. changed the title [-]when using "my text [ text ]" in commit_message, portion in brackets is ignored[/-] [+]No-op mode fails to log any bracket-encased text in commit_message[/+] on Jun 30, 2025
  13. changed the title [-]No-op mode fails to log any bracket-encased text in commit_message[/-] [+]bug: No-op mode fails to log any bracket-encased text in commit_message[/+] on Jun 30, 2025
  14. added a commit that references this issue on Jul 1, 2025
    f25883f
  15. codejedi365 commented on Aug 4, 2025

    @codejedi365
    Contributor

    🎉 This issue has been resolved in v10.3.0 🎉

    You can find more information about this release on the GitHub Releases page.

  16. added and removed
    confirmed
    on Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions