File tree Expand file tree Collapse file tree 6 files changed +1609
-9
lines changed
Expand file tree Collapse file tree 6 files changed +1609
-9
lines changed Original file line number Diff line number Diff line change 1+ extends :
2+ - " @commitlint/config-conventional"
3+
4+ # Single source of truth for commit/PR title conventions.
5+ # Used by:
6+ # - .pre-commit-config.yaml (commitlint hook on commit-msg)
7+ # - .github/workflows/lint_pr.yml (validates PR titles in CI)
8+ rules :
9+ type-enum :
10+ - 2
11+ - always
12+ - - feat
13+ - fix
14+ - docs
15+ - style
16+ - refactor
17+ - perf
18+ - test
19+ - build
20+ - ci
21+ - chore
22+ - revert
23+
24+ # Scope is optional — no enforcement on allowed values.
25+ scope-empty :
26+ - 0
27+
28+ # Feast convention: subjects start with an uppercase letter.
29+ # Overrides base config which defaults to "never sentence-case".
30+ subject-case :
31+ - 2
32+ - always
33+ - - sentence-case
34+
35+ header-max-length :
36+ - 2
37+ - always
38+ - 100
39+
40+ # Relax body/footer line length from base config's strict 100-char limit.
41+ # Commit bodies often contain URLs, stack traces, or formatted output.
42+ body-max-line-length :
43+ - 0
44+ footer-max-line-length :
45+ - 0
Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ jobs:
1414 name : Validate PR title
1515 runs-on : ubuntu-latest
1616 steps :
17- - uses : amannn/action-semantic-pull-request@v5
17+ - uses : actions/checkout@v4
1818 with :
19- # Must use uppercase
20- subjectPattern : ^(?=[A-Z]).+$
21- subjectPatternError : |
22- The subject "{subject}" found in the pull request title "{title}"
23- didn't match the configured pattern. Please ensure that the subject
24- starts with an uppercase character.
19+ sparse-checkout : .commitlintrc.yaml
20+ sparse-checkout-cone-mode : false
21+ - name : Lint PR title with commitlint
2522 env :
26- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
23+ PR_TITLE : ${{ github.event.pull_request.title }}
24+ run : |
25+ npm install --no-save @commitlint/cli @commitlint/config-conventional
26+ echo "$PR_TITLE" | npx commitlint
Original file line number Diff line number Diff line change 2222 - name : Install dependencies
2323 run : |
2424 make install-python-dependencies-ci
25+ - name : Run pre-commit checks
26+ uses : pre-commit/action@v3.0.1
2527 - name : Cache MyPy
2628 uses : actions/cache@v4
2729 with :
Original file line number Diff line number Diff line change 8080 with :
8181 node-version-file : ' ./ui/.nvmrc'
8282 registry-url : ' https://registry.npmjs.org'
83+ cache : ' yarn'
84+ cache-dependency-path : ' ui/yarn.lock'
8385 - name : Install yarn dependencies
8486 working-directory : ./ui
8587 run : yarn install
Original file line number Diff line number Diff line change 11default_stages : [commit]
22
3+ # Generated protobuf files should not be linted or formatted.
4+ # They are produced by `make compile-protos-python` and must be excluded globally.
5+ exclude : ' ^sdk/python/feast/protos/'
6+
37repos :
48 - repo : local
59 hooks :
@@ -29,17 +33,25 @@ repos:
2933 stages : [commit]
3034 language : system
3135 files : ^infra/templates/|\.jinja2$|^docs/roadmap\.md$
32- entry : make build-templates
36+ entry : uv run make build-templates
3337 pass_filenames : false
3438
3539 - repo : https://github.com/Yelp/detect-secrets
3640 rev : v1.5.0
3741 hooks :
3842 - id : detect-secrets
43+ args : ['--baseline', '.secrets.baseline']
3944 exclude : |
4045 (?x)^(
4146 .*\.lock|
4247 .*requirements.*\.txt|
4348 .*\.svg|
4449 .*\.html
4550 )$
51+
52+ - repo : https://github.com/alessandrojcm/commitlint-pre-commit-hook
53+ rev : v9.18.0
54+ hooks :
55+ - id : commitlint
56+ stages : [commit-msg]
57+ additional_dependencies : ["@commitlint/config-conventional"]
You can’t perform that action at this time.
0 commit comments