From c79cf7aa32aad923e19e4f2b4bdcb40d0d0622c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D1=87=D0=B5=D1=80=D0=B5=D1=82=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=87=20=D0=9E=D0=BA=D1=81=D0=B0=D0=BD=D0=B0?= Date: Mon, 22 Dec 2025 14:15:39 +0200 Subject: [PATCH 1/2] chore(repo): enforce conventional commit messages --- .github/workflows/commitlint.yml | 20 ++++++++++++++++++++ commitlint.config.cjs | 13 +++++++++++++ lefthook.yml | 4 ++++ 3 files changed, 37 insertions(+) create mode 100644 .github/workflows/commitlint.yml create mode 100644 commitlint.config.cjs create mode 100644 lefthook.yml diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 000000000000..315596762236 --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -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 +; diff --git a/commitlint.config.cjs b/commitlint.config.cjs new file mode 100644 index 000000000000..7dbe520937d8 --- /dev/null +++ b/commitlint.config.cjs @@ -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', '.'], + }, + }; diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 000000000000..e4262d226725 --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,4 @@ +commit-msg: + commands: + commitlint: + run: npx commitlint --edit {1} From c193d66135577a9b559029a139ca390195c2f089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D1=87=D0=B5=D1=80=D0=B5=D1=82=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=87=20=D0=9E=D0=BA=D1=81=D0=B0=D0=BD=D0=B0?= Date: Mon, 22 Dec 2025 14:22:18 +0200 Subject: [PATCH 2/2] docs(contributing): document conventional commit format --- CONTRIBUTING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 12775310c5f7..0cecf928122d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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