Add `signoff_commit` config option to sign off version commits (DCO support) by Copilot · Pull Request #1492 · python-semantic-release/python-semantic-release · GitHub
Skip to content

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

Draft
codejedi365 with Copilot wants to merge 2 commits into
masterfrom
copilot/implement-signoff-commit-option
Draft

codejedi365 with Copilot wants to merge 2 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 <semantic-release@example.com>

Co-authored-by: codejedi365 <17354856+codejedi365@users.noreply.github.com>
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
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.

2 participants