File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343 - name : Scan repository for secrets (gitleaks)
4444 run : gitleaks git --redact --verbose
4545
46+ - name : Set up Python
47+ uses : actions/setup-python@v5
48+ with :
49+ python-version : " 3.x"
50+
51+ - name : Commit message convention check
52+ run : |
53+ python -m pip install --upgrade pip commitizen
54+ if [ "${{ github.event_name }}" = "pull_request" ]; then
55+ RANGE="${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}"
56+ else
57+ RANGE="${{ github.event.before }}..${{ github.sha }}"
58+ fi
59+ echo "Checking commit messages in range: ${RANGE}"
60+ cz check --rev-range "${RANGE}"
61+
4662 build :
4763 name : Build Binaries (${{ matrix.arch }})
4864 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1717 with :
1818 go-version-file : go.mod
1919
20+ - name : Setup Python
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : " 3.x"
24+
25+ - name : Commit message convention check
26+ run : |
27+ python -m pip install --upgrade pip commitizen
28+ if [ "${{ github.event_name }}" = "pull_request" ]; then
29+ RANGE="${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}"
30+ else
31+ RANGE="${{ github.event.before }}..${{ github.sha }}"
32+ fi
33+ echo "Checking commit messages in range: ${RANGE}"
34+ cz check --rev-range "${RANGE}"
35+
2036 - name : Check linter configuration
2137 run : make lint-config
2238 - name : Run linter
Original file line number Diff line number Diff line change 2323 language : system
2424 types : [go]
2525 pass_filenames : false
26+
27+ - repo : https://github.com/commitizen-tools/commitizen
28+ rev : v4.13.9
29+ hooks :
30+ - id : commitizen
31+ stages : [commit-msg]
Original file line number Diff line number Diff line change 1+ # Quality Gates and Commit Policy
2+
3+ ## Mandatory checks
4+
5+ - Local: run ` pre-commit ` and enforce Conventional Commits at ` commit-msg ` stage.
6+ - CI: enforce commit-message convention in lint workflows for push and pull_request.
7+
8+ ## Local setup
9+
10+ ``` bash
11+ pre-commit install
12+ pre-commit install --hook-type commit-msg
13+ ```
14+
15+ ## Commit message format
16+
17+ Use Conventional Commits:
18+
19+ - ` feat: ... `
20+ - ` fix: ... `
21+ - ` chore(ci): ... `
22+ - ` docs: ... `
You can’t perform that action at this time.
0 commit comments