Skip to content

Latest commit

 

History

History
75 lines (57 loc) · 2.05 KB

CONTRIBUTING.md

File metadata and controls

75 lines (57 loc) · 2.05 KB

Contributing


Git Hooks

Enable git hooks:

chmod +x .githooks/*
git config core.hooksPath .githooks

Checks executed on commit:

Use the Node.js and pnpm versions pinned in package.json. The hook also requires gitleaks and jq in PATH.

pre-commit stops at the first failure:

  1. Secret scan — Gitleaks on staged changes; missing Gitleaks rejects the commit.
  2. Contracts — local catalog and referenced JSON/protobuf checks.
  3. Type check — TypeScript check of the whole package.
  4. Unused code — Knip.
  5. Lint — ESLint on the whole package.

Checks other than the secret scan use the working tree, including unstaged changes. CI checks PRs to main and also builds the package. This package has no unit or integration test runner.

Allowed prefixes for commits and branches:

feat, fix, docs, refactor, perf, test, build, ci, chore, revert.

Commit message format:

<type>(<scope>)?[!]: <subject>

Where:

  • <type> — one of the allowed prefixes above.
  • <scope> — optional scope in parentheses, alphanumeric/-.
  • ! — optional breaking change marker.
  • : — colon + space are required.
  • <subject> — short description.

Total commit message length is limited to 70 characters.

Valid commit examples:

  • feat: add filters to user search
  • fix(auth): handle invalid jwt token
  • refactor(user-service)!: drop legacy ws implementation
  • docs: update api usage section
  • chore(ci): tweak lint step

Branch naming format:

<type>/<slug>
<type>/<scope-or-id>/<slug>

Where:

  • <type> — one of the prefixes listed above.
  • /<scope-or-id> — optional part, alphanumeric/-.
  • /<slug> — short description, alphanumeric/_/-.

Valid branch examples:

  • feat/add-user-search-filters
  • fix/schedule-update-ws-event
  • refactor/core-user-cleanup
  • feat/GOTEC-404/add-notifications-for-users

Exceptions: dev, main, master.