Skip to content

Commit aeb2efa

Browse files
authored
Enhance DCO welcome message with signing instructions (#714)
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>
1 parent a74c30b commit aeb2efa

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/dco-welcome.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: DCO Assistant for First-Time Contributors
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
jobs:
8+
dco-help:
9+
runs-on: ubuntu-latest
10+
# Only run for first-time contributors or users with no previous history
11+
if: |
12+
github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' ||
13+
github.event.pull_request.author_association == 'NONE'
14+
steps:
15+
- name: Post DCO Instructions
16+
uses: peter-evans/create-or-update-comment@v3
17+
with:
18+
issue-number: ${{ github.event.pull_request.number }}
19+
body: |
20+
Welcome to the project, @${{ github.actor }}!
21+
22+
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.
23+
24+
To fix this, please ensure every commit has a `Signed-off-by: Name <email>` line. You can do this automatically by using the `-s` flag:
25+
`git commit -s -m "Your message"`
26+
27+
For existing commits, you can fix them with:
28+
`git commit --amend --signoff` or `git rebase -i HEAD~N --signoff` (where N is the number of commits)
29+
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.
30+
See https://github.com/p4lang/governance/wiki/P4-DCO-Guidelines for information.

0 commit comments

Comments
 (0)