Skip to content

Commit 6ef4837

Browse files
committed
chore: add a precommit hook for signing commit
Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com>
1 parent 5e62a40 commit 6ef4837

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ repos:
6262
exclude: ^(docs/|.*test.*\.py$|utilities/manifests/.*|utilities/plugins/tgis_grpc/.*)
6363

6464

65+
- repo: local
66+
hooks:
67+
- id: check-signoff
68+
name: Check Signed-off-by
69+
stages: [commit-msg]
70+
language: system
71+
entry: >
72+
bash -c 'grep -q "^Signed-off-by:" "$1" ||
73+
{ echo "ERROR: Commit not signed. Use git commit -s"; exit 1; }' --
74+
6575
- repo: https://github.com/espressif/conventional-precommit-linter
6676
rev: v1.11.0
6777
hooks:

0 commit comments

Comments
 (0)