From 77ae464847b5cdc1d36ef471f6ca40e3d441a465 Mon Sep 17 00:00:00 2001 From: Marc Vornetran Date: Mon, 24 Aug 2026 13:37:49 +0200 Subject: [PATCH 1/3] Use DCO instead of CLA Signed-off-by: Marc Vornetran --- .../contribution-process/contributor-guide.md | 67 ++++++++++++++++++- 1 file changed, 65 insertions(+), 2 deletions(-) diff --git a/hugo/content/contribute/contribution-process/contributor-guide.md b/hugo/content/contribute/contribution-process/contributor-guide.md index 78ab5fad6..3e858e8a6 100644 --- a/hugo/content/contribute/contribution-process/contributor-guide.md +++ b/hugo/content/contribute/contribution-process/contributor-guide.md @@ -33,7 +33,71 @@ Please report abusive, harassing, or unacceptable behavior to [gardener-tsc@list ### Developer Certificate of Origin -Contributors must accept a Developer Certificate of Origin (DCO) before submitting their first pull request. This happens in an automated fashion during the submission process. We use [the standard DCO text of the Linux Foundation](https://developercertificate.org/). +Contributors sign off that they adhere to the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) when making contributions to the project. +This happens by adding a `Signed-off-by` line to commit messages. + +
+Signing off commit messages + +A signed off commit message looks like this: +```text +This is my commit message + +Signed-off-by: Random J Developer +``` + +Make sure to configure your identity in the Git config: + +```shell +git config --global user.name "Random J Developer" +git config --global user.email "random@developer.example.org" +``` + +In your `~/.gitconfig` this looks like this: + +```text +[user] + name = Random J Developer + email = random@developer.example.org +``` + +You can sign commits by adding `-s` to the `git commit` command: + +```shell +git commit -s -m 'This is my commit message' +``` + +If you want to sign off all commits by default you could add a `prepare-commit-msg` Git hook: + +1. If not already present create a folder for your Git hooks. You can choose any path, e.g. `mkdir ~/git-hooks` +2. Configure the hooks path in your `~/.gitconfig` +```text +[core] +hooksPath = ~/git-hooks +``` +3. Create the file `~/git-hooks/prepare-commit-msg` and add: +```shell +#!/bin/sh +# Automatically append Signed-off-by trailer if not already present + +set -eu + +NAME="$(git config user.name)" +EMAIL="$(git config user.email)" + +if [ -z "$NAME" ] || [ -z "$EMAIL" ]; then + echo "commit-msg: user.name or user.email not set in git config; skipping Signed-off-by" >&2 + exit 0 +fi + +SIGNOFF="Signed-off-by: $NAME <$EMAIL>" + +if ! grep -qF "$SIGNOFF" "$1"; then + printf "\n%s\n" "$SIGNOFF" >> "$1" +fi +``` + +
### License @@ -41,7 +105,6 @@ Your contributions to Gardener must be licensed properly: * Code contributions must be licensed under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0) * Documentation contributions must be licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/legalcode) -* You need to sign the Contributor License Agreement. We are using *[CLA assistant](https://cla-assistant.io/)*, which provides a click-through workflow for accepting the CLA. For company contributors, the company also needs to sign a corporate license agreement. ## Contributing From a4685d0c908593faa4325d1a28bcca587c412874 Mon Sep 17 00:00:00 2001 From: Marc Vornetran Date: Mon, 24 Aug 2026 16:23:46 +0200 Subject: [PATCH 2/3] Adjust phrasing (PR review) Signed-off-by: Marc Vornetran --- .../contribute/contribution-process/contributor-guide.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hugo/content/contribute/contribution-process/contributor-guide.md b/hugo/content/contribute/contribution-process/contributor-guide.md index 3e858e8a6..be88f754e 100644 --- a/hugo/content/contribute/contribution-process/contributor-guide.md +++ b/hugo/content/contribute/contribution-process/contributor-guide.md @@ -37,9 +37,9 @@ Contributors sign off that they adhere to the [Developer Certificate of Origin ( This happens by adding a `Signed-off-by` line to commit messages.
-Signing off commit messages +Signing off on commits -A signed off commit message looks like this: +A signed-off commit message looks like this: ```text This is my commit message @@ -61,13 +61,13 @@ In your `~/.gitconfig` this looks like this: email = random@developer.example.org ``` -You can sign commits by adding `-s` to the `git commit` command: +You can sign off on commits by adding `-s` to the `git commit` command: ```shell git commit -s -m 'This is my commit message' ``` -If you want to sign off all commits by default you could add a `prepare-commit-msg` Git hook: +If you want to sign off on every commit by default, you could add a `prepare-commit-msg` Git hook: 1. If not already present create a folder for your Git hooks. You can choose any path, e.g. `mkdir ~/git-hooks` 2. Configure the hooks path in your `~/.gitconfig` From 7271c525842ae6e983df6242634dd014e3c668a5 Mon Sep 17 00:00:00 2001 From: Marc Vornetran Date: Mon, 24 Aug 2026 16:43:53 +0200 Subject: [PATCH 3/3] Simplify Git hook for adding SOB (PR review) Signed-off-by: Marc Vornetran --- .../contribution-process/contributor-guide.md | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/hugo/content/contribute/contribution-process/contributor-guide.md b/hugo/content/contribute/contribution-process/contributor-guide.md index be88f754e..16abcd835 100644 --- a/hugo/content/contribute/contribution-process/contributor-guide.md +++ b/hugo/content/contribute/contribution-process/contributor-guide.md @@ -78,23 +78,8 @@ hooksPath = ~/git-hooks 3. Create the file `~/git-hooks/prepare-commit-msg` and add: ```shell #!/bin/sh -# Automatically append Signed-off-by trailer if not already present - -set -eu - -NAME="$(git config user.name)" -EMAIL="$(git config user.email)" - -if [ -z "$NAME" ] || [ -z "$EMAIL" ]; then - echo "commit-msg: user.name or user.email not set in git config; skipping Signed-off-by" >&2 - exit 0 -fi - -SIGNOFF="Signed-off-by: $NAME <$EMAIL>" - -if ! grep -qF "$SIGNOFF" "$1"; then - printf "\n%s\n" "$SIGNOFF" >> "$1" -fi +SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +git interpret-trailers --in-place --trailer "$SOB" "$1" ```