Skip to content

fix: parse sign_tags from config as boolean#281

Open
maimul wants to merge 1 commit into
c4urself:masterfrom
maimul:fix/269-sign-tags-boolean-parsing
Open

fix: parse sign_tags from config as boolean#281
maimul wants to merge 1 commit into
c4urself:masterfrom
maimul:fix/269-sign-tags-boolean-parsing

Conversation

@maimul

@maimul maimul commented May 30, 2026

Copy link
Copy Markdown

Problem

Setting sign_tags = False in .bumpversion.cfg has no effect. The boolean-parsing loop in _load_configuration only covers commit, tag, and dry_run, so sign_tags is never read from the config file. Users who set sign_tags = False to suppress GPG signing still get signing attempts, which fail if no GPG key is configured.

Fix

Add sign_tags to the boolean-parsing loop (one-line change in cli.py):

# before
for boolvaluename in ("commit", "tag", "dry_run"):

# after
for boolvaluename in ("commit", "tag", "dry_run", "sign_tags"):

Reproducer

# .bumpversion.cfg
[bumpversion]
current_version = 1.0.0
sign_tags = False

Before this fix, sign_tags remains True (the argparse default), so bumpversion attempts GPG signing. After this fix it is correctly False.

Fixes #269

sign_tags = False in .bumpversion.cfg was silently ignored because the
boolean parsing loop only covered commit, tag, and dry_run. Adding
sign_tags to that loop makes config-file values take effect correctly.

Fixes c4urself#269
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

Successfully merging this pull request may close these issues.

Bug: setting sign_tags=False in config file doesn't work

1 participant