Skip to content

Commit

Permalink
check if signoff warning is raised (#319)
Browse files Browse the repository at this point in the history
Signed-off-by: Vibhu Jawa <[email protected]>
  • Loading branch information
VibhuJawa authored Oct 24, 2024
1 parent 717da18 commit c60c6e6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ ci:
autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'
autoupdate_schedule: quarterly

default_install_hook_types: [pre-commit, commit-msg]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
Expand Down Expand Up @@ -47,3 +49,21 @@ repos:
- id: isort
name: Format imports
exclude: docs/|nemo_curator/modules/__init__.py

- repo: local
hooks:
- id: check-signoff
name: Check Signed-off-by
entry: bash -c 'if ! grep -q "Signed-off-by:" "$1"; then echo "❌ Commit message must be signed off. Use git commit -s to add it automatically."; exit 1; fi' --
language: system
always_run: true
stages: [commit-msg]
types: [text]

- id: pre-commit-reminder
name: Pre-commit Installation Reminder
entry: echo "⚠️ Remember to install pre-commit and hooks (pip install pre-commit && pre-commit install --install-hooks)"
language: system
always_run: true
pass_filenames: false
stages: [pre-commit]

0 comments on commit c60c6e6

Please sign in to comment.