Skip to content

Commit

Permalink
fix(commit): avoid warnings with 'always_signoff' configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian DC <[email protected]>
  • Loading branch information
AdrianDC committed Aug 13, 2024
1 parent cf9c847 commit e5629e5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions commitizen/commands/commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,17 @@ 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", "")

if signoff:
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"
Expand Down

0 comments on commit e5629e5

Please sign in to comment.