From 75102f54b8f38abbc98fd88989c2cde2ef5f43a0 Mon Sep 17 00:00:00 2001 From: Fabian Ruffy <5960321+fruffy@users.noreply.github.com> Date: Fri, 6 Feb 2026 14:48:15 -0500 Subject: [PATCH] Enhance DCO welcome message with signing instructions Updated the DCO welcome message to include additional instructions for signing commits and a link to the DCO guidelines. Signed-off-by: Fabian Ruffy <5960321+fruffy@users.noreply.github.com> --- .github/workflows/dco-welcome.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/dco-welcome.yml diff --git a/.github/workflows/dco-welcome.yml b/.github/workflows/dco-welcome.yml new file mode 100644 index 00000000..626b5634 --- /dev/null +++ b/.github/workflows/dco-welcome.yml @@ -0,0 +1,30 @@ +name: DCO Assistant for First-Time Contributors + +on: + pull_request_target: + types: [opened] + +jobs: + dco-help: + runs-on: ubuntu-latest + # Only run for first-time contributors or users with no previous history + if: | + github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' || + github.event.pull_request.author_association == 'NONE' + steps: + - name: Post DCO Instructions + uses: peter-evans/create-or-update-comment@v3 + with: + issue-number: ${{ github.event.pull_request.number }} + body: | + Welcome to the project, @${{ github.actor }}! + + It looks like this is your first contribution. We noticed the **DCO (Developer Certificate of Origin)** check might fail if your commits aren't signed. + + To fix this, please ensure every commit has a `Signed-off-by: Name ` line. You can do this automatically by using the `-s` flag: + `git commit -s -m "Your message"` + + For existing commits, you can fix them with: + `git commit --amend --signoff` or `git rebase -i HEAD~N --signoff` (where N is the number of commits) + The Developer Community DCO guide also provides helpful tips on fixing DCO inconveniences. Setting a commit hook in the git repository will automate adding the DCO signoff. + See https://github.com/p4lang/governance/wiki/P4-DCO-Guidelines for information.