-
Notifications
You must be signed in to change notification settings - Fork 40
Commit message linting #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 2 commits
c2f23f6
69c8262
ded8b1b
24c05a9
f7fd0b6
68cae46
161e5fa
b53fae1
4fbd098
470a690
8677abe
4975568
18c3066
030f142
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Commit Message Lint | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, edited] | ||
|
||
jobs: | ||
lint-commits: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout PR branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '22' | ||
|
||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Lint commit messages | ||
run: | | ||
git fetch origin main | ||
COMMITS=$(git log origin/main..HEAD --pretty=format:"%H") | ||
echo "$COMMITS" | while read commit; do | ||
npx commitlint --from=$commit --to=$commit --verbose | ||
done |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit $1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm test |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no-install cz | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
|
||
}; |
Uh oh!
There was an error while loading. Please reload this page.