Skip to content

Commit ccfbf3d

Browse files
sanafayyaz315claude
andcommitted
chore: add conventional commits pre-commit hook
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent df53bcd commit ccfbf3d

2 files changed

Lines changed: 68 additions & 11 deletions

File tree

.pre-commit-config.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Pre-commit configuration for agentic-starter-kits
2+
# Install: pre-commit install --install-hooks
3+
# Run manually: pre-commit run --all-files
4+
5+
default_install_hook_types:
6+
- pre-commit
7+
- commit-msg
8+
9+
repos:
10+
# Enforce Conventional Commits in commit messages
11+
- repo: https://github.com/espressif/conventional-precommit-linter
12+
rev: v1.11.0
13+
hooks:
14+
- id: conventional-precommit-linter
15+
stages: [commit-msg]
16+
# more args can be added here to customize the linter behavior
17+
# more args can be found here: https://github.com/espressif/conventional-precommit-linter
18+
args:
19+
- --types=feat,fix,docs,chore,test,perf,refactor,ci,build,style,revert
20+
- --subject-min-length=10
21+
- --subject-max-length=72
22+
- --allow-breaking

CONTRIBUTING.md

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,46 @@ Thank you for your interest in contributing. This document gives a short overvie
1414

1515
Before submitting, please read our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you agree to uphold it.
1616

17+
## Development setup
18+
19+
This repository uses [pre-commit](https://pre-commit.com/) hooks to enforce code quality checks before each commit. Set it up once after cloning:
20+
21+
```bash
22+
pip install pre-commit
23+
pre-commit install --install-hooks
24+
```
25+
26+
After this, every `git commit` will automatically validate your commit message format (see below).
27+
1728
## Commit message conventions
1829

19-
We encourage [Conventional Commits](https://www.conventionalcommits.org/) so that history and release notes stay clear.
30+
This repository enforces the [Conventional Commits](https://www.conventionalcommits.org/) specification via a pre-commit hook. Commits that don't follow this format will be rejected.
31+
32+
### Format
33+
34+
```
35+
<type>(optional scope): <description>
36+
37+
[optional body]
2038
21-
Use one of these prefixes at the start of your commit message:
39+
[optional footer(s)]
40+
```
2241

23-
| Prefix | Meaning |
24-
| --------- | -------- |
25-
| **feat:** | A new feature |
26-
| **fix:** | A bug fix |
27-
| **perf:** | A change that improves performance |
28-
| **chore:**| Maintenance (deps, tooling, config) |
29-
| **docs:** | Documentation only |
30-
| **test:** | Adding or updating tests |
42+
### Allowed types
43+
44+
| Prefix | Meaning |
45+
| ------------- | -------- |
46+
| **feat:** | A new feature |
47+
| **fix:** | A bug fix |
48+
| **docs:** | Documentation only |
49+
| **chore:** | Maintenance (deps, tooling, config) |
50+
| **test:** | Adding or updating tests |
51+
| **perf:** | A change that improves performance |
52+
| **refactor:** | Code change that neither fixes a bug nor adds a feature |
53+
| **ci:** | CI/CD changes |
54+
| **build:** | Build system or external dependency changes |
55+
| **style:** | Code style (formatting, whitespace — no logic changes) |
56+
| **revert:** | Reverts a previous commit |
3157

3258
You can optionally add a scope (e.g. the agent or module name) in parentheses after the type.
3359

@@ -39,9 +65,18 @@ fix: correct env var name in deployment in langgraph_react_agent
3965
docs: update README with OpenShift deploy steps
4066
test: add tests for tool registration
4167
chore: bump python-dotenv in requirements
68+
refactor(langgraph): extract tool registration into helper
69+
ci: add ruff linting workflow
70+
feat!: change /chat response format
4271
```
4372

44-
This is optional but appreciated; maintainers may ask you to reword commits when preparing a release.
73+
For breaking changes, add `!` after the type/scope (e.g. `feat!:`) or include a `BREAKING CHANGE:` footer:
74+
75+
```
76+
feat: change /chat response format
77+
78+
BREAKING CHANGE: response field "text" renamed to "content"
79+
```
4580

4681
## Automated PR labels
4782

0 commit comments

Comments
 (0)