Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: commitlint

on:
pull_request:

jobs:
lint-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 18

- run: npm install --no-save @commitlint/cli @commitlint/config-conventional
- run: npx commitlint --from origin/next --to HEAD
;
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,15 @@ If you're looking for a good place to start, look for issues labeled ["good firs
- I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code.
- Every change is related to the PR description.
- I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this pull request to relevant issues (if any exist).

## Commit messages

This repository follows the Conventional Commits specification.

Format:
type(scope)!: short, lowercase description

Examples:
- fix(avm): correct calldata offset handling
- chore(ci): avoid duplicate slack notifications
- feat(bb)!: remove deprecated proving api
13 changes: 13 additions & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
['feat', 'fix', 'chore', 'refactor', 'docs', 'test', 'perf', 'ci'],
],
'scope-case': [2, 'always', 'kebab-case'],
'subject-case': [2, 'always', ['lower-case']],
'subject-full-stop': [2, 'never', '.'],
},
};
4 changes: 4 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
commit-msg:
commands:
commitlint:
run: npx commitlint --edit {1}
Loading