Contributing to GoForge¶
Thank you for your interest in contributing to GoForge. This section covers everything you need to know to get started as a contributor.
Sections¶
- Development Setup -- Set up your local development environment
- Testing -- Running and writing tests
- Linting -- Code quality and formatting standards
- Database Migrations -- Creating and managing schema changes
- Templates & Frontend -- Working with templ templates and HTMX
Contribution Workflow¶
- Fork the repository
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes
- Run checks:
make check - Commit with conventional commits:
feat(deploy): add blue-green strategy - Push and open a pull request
Commit Message Convention¶
Use Conventional Commits:
| Type | Usage |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation only |
refactor | Code restructuring without behavior change |
test | Adding or updating tests |
chore | Build, CI, or dependency updates |
Examples:
feat(deploy): add blue-green deployment strategy
fix(auth): prevent session fixation on login
docs(api): add webhook endpoint documentation
refactor(docker): extract build logic to separate file
test(services): add catalog template parsing tests
chore(deps): update go-github to v60
Code Style¶
- Run
make fmtbefore committing (enforced by CI) - Follow the naming conventions in AGENTS.md
- Handle all errors explicitly -- never ignore them
- Use
context.Contextas the first parameter for I/O functions - Wrap errors with context:
fmt.Errorf("failed to create project: %w", err)