Contributing¶
Guidelines for contributing to Minecraft Operator.
Getting Started¶
- Fork the repository
- Clone your fork
- Set up development environment (see Setup)
- Create a feature branch
- Make changes
- Submit a pull request
Workflow¶
Branch Naming¶
Use descriptive branch names:
Commit Messages¶
Use semantic commit format:
type(scope): brief description
Optional longer explanation.
Co-Authored-By: Your Name <email@example.com>
Types:
| Type | Description |
|---|---|
feat | New features |
fix | Bug fixes |
docs | Documentation |
refactor | Code refactoring |
test | Test changes |
chore | Maintenance |
ci | CI/CD changes |
Example:
feat(plugins): add Modrinth source support
Implement Modrinth API client for fetching plugin metadata.
Supports version filtering by Minecraft version compatibility.
Co-Authored-By: Developer <dev@example.com>
Pull Requests¶
- Create draft PR initially
- Fill template completely
- Request review when ready
- Address feedback
- Squash merge when approved
Code Standards¶
Go Code¶
- Follow Effective Go
- Use
gofmtformatting - Pass
golangci-lintwithout errors - Add tests for new code
Testing¶
TDD is mandatory:
- Write failing test first
- Implement minimal code
- Pass test
- Refactor
func TestSolverFindsCompatibleVersion(t *testing.T) {
// 1. Write test first
solver := NewSimpleSolver()
result, err := solver.Solve(plugins, servers)
require.NoError(t, err)
assert.Equal(t, "1.21.1", result.PaperVersion)
}
Logging¶
Use log/slog with constant messages:
// Good
slog.InfoContext(ctx, "Update available", "version", version)
// Bad - variable in message
slog.InfoContext(ctx, fmt.Sprintf("Update to %s available", version))
Review Checklist¶
Before submitting:
- Tests pass:
make test - Linter passes:
make lint - Code generated:
make manifests generate - Documentation updated
- Commits signed off
Areas for Contribution¶
High Priority¶
- Test coverage for
pkg/solver/andpkg/plugins/ - Modrinth plugin source support
- Documentation improvements
Medium Priority¶
- E2E test expansion
- Prometheus metrics
- Web UI enhancements
Good First Issues¶
Check GitHub Issues for beginner-friendly tasks.
Code of Conduct¶
Be respectful and constructive in all interactions.
License¶
By contributing, you agree your code will be licensed under BSD-3-Clause.
See Also¶
- Setup — Development environment
- Architecture — System design
- GitHub Issues — Open tasks