Skip to content

Add signoff_commit config option to sign off version commits (DCO support) - #1492

Merged
codejedi365 merged 3 commits into
masterfrom
copilot/implement-signoff-commit-option
Sep 22, 2026
Merged

codejedi365 merged 3 commits into
masterfrom
copilot/implement-signoff-commit-option

Conversation

Copilot AI commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Adds a signoff_commit configuration option so that automated version-bump commits can include a Signed-off-by trailer, supporting Developer Certificate of Origin (DCO) compliance for release automation.

Configuration

  • Added signoff_commit: bool (default False) to RawConfig and RuntimeContext in src/semantic_release/cli/config.py, following the same pattern as no_git_verify.

Git commit logic

  • Added a signoff parameter to GitProject.git_commit() in src/semantic_release/gitproject.py. Since this method already shells out to the real git commit binary (via repo.git.commit(...)), signoff is implemented by passing signoff=True through to git's native --signoff flag rather than manually constructing the trailer — git generates the correct Signed-off-by: Name <email> line using the already-configured committer identity.
  • Noop output now reflects --signoff when the option is enabled.

Wiring

  • cli/commands/version.py reads runtime.signoff_commit and passes it to project.git_commit(...) when creating the version commit.

Documentation

  • Documented signoff_commit in docs/configuration/configuration.rst.

Example config:

[tool.semantic_release]
signoff_commit = true

Resulting commit message:

chore(release): bump version to 1.2.3

Signed-off-by: semantic-release <[email protected]>

Closes: #1441

Copilot AI changed the title [WIP] Add support for automatically including Signed-off-by line in commits Add signoff_commit config option to sign off version commits (DCO support) Sep 7, 2026
Copilot AI requested a review from codejedi365 September 7, 2026 11:34
@codejedi365
codejedi365 force-pushed the copilot/implement-signoff-commit-option branch from 396a55b to 9832ae3 Compare September 22, 2026 06:23
@codejedi365
codejedi365 marked this pull request as ready for review September 22, 2026 06:27
@codejedi365
codejedi365 force-pushed the copilot/implement-signoff-commit-option branch from 9832ae3 to b652bee Compare September 22, 2026 06:54
codejedi365 and others added 3 commits September 22, 2026 01:08
NOTICE: With this release, we added a boolean flag,
`semantic_release.signoff_commit`, as an available configuration option
to toggle the addition of the `Signed-off-by` git trailer/footer message to
release commits made by Python Semantic Release. Default is currently set to
`False` but if you want to try this option, set this configuration setting
to `True`. In a future major release, this setting will be set to `True` by
default.

Implements: #1441
@codejedi365
codejedi365 force-pushed the copilot/implement-signoff-commit-option branch from b652bee to ee2c7b7 Compare September 22, 2026 07:08
@codejedi365
codejedi365 merged commit 3cecbeb into master Sep 22, 2026
9 checks passed
@codejedi365
codejedi365 deleted the copilot/implement-signoff-commit-option branch September 22, 2026 07:25
@codejedi365

Copy link
Copy Markdown
Contributor

🎉 This PR has been published as part of v10.7.0 🎉

You can find more information about this release on the GitHub Releases page.

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.

feat: option to signoff commits done by python-semantic-release

2 participants