Skip to content

Commit a1d8d99

Browse files
committed
refactor(ci): replace JS PR title linter with Python commit linter
1 parent c16cd40 commit a1d8d99

5 files changed

Lines changed: 297 additions & 193 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,7 @@ on:
1212
branches: [ main ]
1313

1414
jobs:
15-
lint-commits:
16-
# Note: To re-run `lint-commits` after fixing the PR title, close-and-reopen the PR.
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20-
- name: Use Node.js
21-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
22-
with:
23-
node-version: 22.x
24-
- name: Check PR title
25-
run: |
26-
node "$GITHUB_WORKSPACE/.github/workflows/lintcommit.js"
27-
2815
build:
29-
needs: lint-commits
30-
3116
runs-on: ubuntu-latest
3217
strategy:
3318
fail-fast: false

.github/workflows/lintcommit.js

Lines changed: 0 additions & 178 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ There is a convenience script for the above that you can run from the root of th
3030
ops/ci-checks.sh
3131
```
3232

33+
This script also validates your commit messages against the [Conventional Commits](https://www.conventionalcommits.org/) format.
34+
If you have uncommitted changes, it will skip commit message validation with a warning - commit first, then re-run to validate.
35+
36+
You can also run the commit message check independently:
37+
```
38+
python ops/lintcommit.py --local
39+
```
40+
3341
## Coding Standards
3442
Consistency is important for maintainability. Please adhere to the house-style of the repo, unless there's a really
3543
good reason to break pattern.

ops/ci-checks.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ echo SUCCESS: typings
1313
# static analysis
1414
hatch fmt
1515
echo SUCCESS: linting/fmt
16+
17+
# commit message validation
18+
python ops/lintcommit.py

0 commit comments

Comments
 (0)