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 authored and Lee-W committed Nov 16, 2024
1 parent 26be522 commit 18e4928
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 @@ -134,16 +134,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:
extra_args = f"{extra_args} -s".strip()

c = git.commit(m, args=extra_args)
Expand Down

0 comments on commit 18e4928

Please sign in to comment.