-
Notifications
You must be signed in to change notification settings - Fork 33
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
chore: introduce commitlint #369
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
.husky/commit-msg
Outdated
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit ${1} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npx --no -- commitlint --edit ${1} | |
pnpm dlx commitlint --edit ${1} |
.github/workflows/main.yml
Outdated
@@ -25,6 +25,14 @@ jobs: | |||
version: 7.30 | |||
run_install: true | |||
|
|||
- name: Validate current commit (last commit) | |||
if: github.event_name == 'push' | |||
run: npx commitlint --from HEAD~1 --to HEAD --verbose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run: npx commitlint --from HEAD~1 --to HEAD --verbose | |
run: pnpm dlx --from HEAD~1 --to HEAD --verbose |
.github/workflows/main.yml
Outdated
|
||
- name: Validate PR commits | ||
if: github.event_name == 'pull_request' | ||
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose | |
run: pnpm dlx --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose |
f031ed8
to
719c2a2
Compare
This PR introduces - commitlint for linting commit messages. Based on conventional commits we are going to have automatically generated changelog.