- Why: - Align with Conventional Commits specification for consistency - English is standard for open-source and team collaboration - What: - Change primary language to English (Russian still allowed) - Add type and scope reference tables - Add both English and Russian body templates - Add good/bad examples section - Add quick reference for common commit types - Check: - File renders correctly in markdown viewer - Examples follow the new format rules
3.8 KiB
3.8 KiB
Commit Rules
Unified commit style for all project contributors. Follows Conventional Commits specification.
Language
- Primary language: English
- Russian is allowed for internal team convenience
- Technical terms (Airflow, ClickHouse, Kafka, MV, DDL) keep as-is
Header Format
<type>(<scope>): <short description>
- Maximum header length: 72 characters
- Use imperative mood ("add", "fix", "update", not "added", "fixed")
- No trailing period
Allowed type
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
refactor |
Code restructuring without behavior change |
docs |
Documentation only |
test |
Tests, checks, validations |
chore |
Maintenance (configs, scripts, hooks) |
ci |
CI/CD changes |
perf |
Performance optimization |
revert |
Revert previous commit |
Recommended scope for this repo
| Scope | Used for |
|---|---|
airflow |
DAGs, operators, Airflow config |
stg |
STG layer tables and pipelines |
ods |
ODS layer tables and pipelines |
dds |
DDS layer tables and pipelines |
dm |
Data mart views and tables |
kafka |
Kafka topics, producers, consumers |
superset |
Dashboards, datasets, charts |
monitoring |
Prometheus, Grafana, alerts |
scripts |
Shell scripts, automation |
docs |
Documentation, README, plans |
infra |
Docker, compose, infrastructure |
Body Structure
For non-trivial changes, body is required. Use bullet points for readability.
Template (English)
<type>(<scope>): <short description>
- Why:
- reason for change
- What:
- key change 1
- key change 2
- Check:
- how verified (command/test/smoke-check)
Template (Russian - допустимо)
<type>(<scope>): <краткое описание>
- Зачем:
- причина изменения
- Что:
- ключевое изменение 1
- ключевое изменение 2
- Проверка:
- как проверено
Commit Scope Rules
- One commit = one logical task
- Don't mix feature changes with large refactoring
- Update docs in the same commit where behavior changes
Breaking Changes
Use ! in header for breaking changes:
feat(ods)!: change browser_event table contract
Add footer:
BREAKING CHANGE: column event_type renamed to event_name
Examples
Good examples
feat(superset): add e-commerce analytics dashboard
- Why:
- Business needs visualization for clickstream analysis
- What:
- Add superset-init service to docker-compose
- Create Python scripts for ClickHouse connection
- Add 10 charts (KPI, traffic, geo, UTM, DQ)
- Makefile commands superset-*
- Check:
- Dashboard opens at http://localhost:8088
- All charts load data from dm.v_events_enriched
fix(kafka): correct volume path for KRaft mode
- Why:
- Kafka fails to start with permission denied on /tmp/kraft-combined-logs
- What:
- Change volume path to /var/lib/kafka/data
- Check:
- make up starts Kafka successfully
docs(architecture): update data flow diagram after ODS migration
chore(scripts): sync make transform with new ETL pipeline
Bad examples (don't do this)
❌ added superset dashboard # no type, past tense
❌ feat: добавлен дашборд # no scope, mixed languages
❌ fix: исправлен баг # no scope, past tense, vague description
❌ feat(airflow): add feature and fix bug and update docs # multiple concerns
Quick Reference
# Feature
feat(scope): add something new
# Bug fix
fix(scope): correct something
# Documentation
docs(scope): update something
# Refactoring
refactor(scope): restructure something
# Performance
perf(scope): optimize something
# Maintenance
chore(scope): update something