diff --git a/commitizen/commands/commit.py b/commitizen/commands/commit.py index 1c7278ddf..9b13a020b 100644 --- a/commitizen/commands/commit.py +++ b/commitizen/commands/commit.py @@ -134,9 +134,8 @@ def __call__(self): if dry_run: raise DryRunExit() - signoff: bool = ( - self.arguments.get("signoff") or self.config.settings["always_signoff"] - ) + always_signoff: bool = self.config.settings["always_signoff"] + signoff: bool = self.arguments.get("signoff") extra_args = self.arguments.get("extra_cli_args", "") @@ -144,6 +143,8 @@ def __call__(self): out.warn( "signoff mechanic is deprecated, please use `cz commit -- -s` instead." ) + + if always_signoff or signoff: extra_args = f"{extra_args} -s".strip() c = git.commit(m, args=extra_args)