Skip to main content

Git Conventions

Branch Naming

All branches must include a Jira ticket key and follow this pattern:

<type>/<TICKET-KEY>[-<description>]

Allowed types: feature, fix, docs, chore, refactor

Examples

  • feature/PTSB-123-add-team-invitations
  • fix/PTSB-456-login-redirect
  • chore/PTSB-789-update-deps
  • docs/PTSB-101
  • feature/add-team-invitations (missing ticket key)
  • Feature/PTSB-123 (wrong case)
  • PTSB-123-add-feature (missing type prefix)

Exempt branches

The following branch patterns are exempt from the naming convention:

  • release/* — Release branches
  • hotfix/* — Urgent production fixes
  • renovate/* / dependabot/* — Automated dependency updates
  • revert-* — GitHub revert branches

CI enforcement

A non-blocking CI check validates the branch name on every PR targeting main. If the branch name does not match the convention, an informational comment is posted on the PR.

Commit Messages

We use Conventional Commits format for standardized commit messages.

Format

<type>(scope): <description>

[optional body]

[optional footer(s)]

Types

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit

Scopes

  • web: Web application
  • dev-tool: Development tools
  • e2e: End-to-end tests
  • ui: UI components
  • supabase: Database/backend
  • auth: Authentication
  • billing: Billing system
  • admin: Admin features
  • i18n: Internationalization
  • shared: Shared packages
  • config: Configuration
  • deps: Dependencies
  • repo: Repository-wide changes
  • tooling: Development tooling

Examples

  • feat(auth): add two-factor authentication
  • fix(billing): resolve subscription update issue
  • docs(repo): update installation instructions
  • chore(deps): update dependencies
  • Added new feature (missing type and scope)

Quick Start

  1. Create branch: pnpm branch:create
  2. Make changes and stage them: git add .
  3. Commit: git commit -m "type(scope): message"
  4. Push: git push

CI Validation

The CI pipeline automatically validates:

  • Branch names — a non-blocking informational check posts a comment on the PR if the name doesn't match the convention (it does not prevent merging)
  • Commit messages — must follow conventional commit format
  • PR titles — must follow conventional commit format

Make sure all commits in your PR follow the conventional commit format before creating the pull request.