Skip to content

Commit

Permalink
Merge pull request #1034 from espressif/precommit
Browse files Browse the repository at this point in the history
ci: Add conventional-precommit-linter on pull_request
  • Loading branch information
kolipakakondal authored Sep 7, 2023
2 parents 0de6afe + 17c09d1 commit fae8e56
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Precommit Hook

on:
pull_request:
branches: [ master ]

jobs:
precommit:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install pre-commit
run: pip install pre-commit

- name: Run pre-commit hook
run: pre-commit run --all-files
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
---
minimum_pre_commit_version: 3.3.0
default_install_hook_types: [pre-commit, commit-msg]

repos:
- repo: https://github.com/espressif/conventional-precommit-linter
rev: v1.2.1
hooks:
- id: conventional-precommit-linter
stages: [commit-msg]

0 comments on commit fae8e56

Please sign in to comment.