Skip to content

Latest commit

 

History

History
76 lines (55 loc) · 2.47 KB

File metadata and controls

76 lines (55 loc) · 2.47 KB

Contributing to ormshift

Table of Contents

How to Contribute

Commit Message Guidelines

All pull request titles must follow the Conventional Commits specification. Individual commits within your PR can use any format you prefer; only the PR title matters, as it becomes the commit message on main after squashing.

Format

<type>(<scope>): <subject>

Types

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation changes
  • refactor: Code refactoring without feature changes or bug fixes
  • test: Adding or updating tests
  • chore: Build, CI, dependencies, or tooling changes
  • perf: Performance improvements

Scope

Optional but recommended. Use the affected component:

  • migrations - Migration system changes
  • schema - Schema package changes
  • builder - SQL builder changes
  • executor - Executor changes
  • dialects/postgresql - PostgreSQL dialect
  • dialects/sqlite - SQLite dialect
  • dialects/sqlserver - SQL Server dialect

Examples

  • feat(migrations): add transaction support for Up/Down operations
  • fix(schema): validate table names case-insensitively
  • docs(README): add foreign key examples
  • test(dialects/postgresql): add boolean conversion tests
  • refactor: remove hungarian notation from variable names

Merging Pull Requests

All pull requests must be squashed before merging to main. This ensures that only the PR title (following Conventional Commits) becomes a commit on the main branch.

  • Use GitHub's "Squash and merge" option when merging
  • The PR title becomes the commit message on main
  • One logical change = one squashed commit

Pre-Submission Checklist

Before opening a PR:

  • Code follows Go idioms and project conventions
  • Tests added/updated for new functionality
  • No Hungarian notation or inconsistent naming
  • Error messages are wrapped with context using fmt.Errorf(...%w...)
  • Godoc comments added for exported types/functions
  • PR title follows Conventional Commits format