From e5629e5357d758f07bf2387ae470452a2dc2cd62 Mon Sep 17 00:00:00 2001 From: Adrian DC Date: Tue, 13 Aug 2024 12:07:48 +0200 Subject: [PATCH] fix(commit): avoid warnings with 'always_signoff' configuration Signed-off-by: Adrian DC --- commitizen/commands/commit.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/commitizen/commands/commit.py b/commitizen/commands/commit.py index 7c1c9fded..811950b85 100644 --- a/commitizen/commands/commit.py +++ b/commitizen/commands/commit.py @@ -110,9 +110,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", "") @@ -120,6 +119,8 @@ def __call__(self): out.warn( "signoff mechanic is deprecated, please use `cz commit -- -s` instead." ) + + if always_signoff or signoff: if extra_args: extra_args += " " extra_args += "-s"