- Go 1.24 or later
- Git
- Make (optional, for using Makefile commands)
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR-USERNAME/common.git - Add upstream:
git remote add upstream https://github.com/kopexa-grc/common.git
-
Create a new branch from
main:git checkout main git pull upstream main git checkout -b feature/your-feature-name
-
Make your changes following our coding standards
-
Write or update tests as needed
-
Run tests locally:
go test ./... -
Commit your changes using conventional commits
We use Dependabot to keep our dependencies up to date. When reviewing Dependabot PRs:
- Check the changelog/release notes of the updated dependency
- Verify that the update is compatible with our codebase
- Run the test suite to ensure nothing breaks
- Pay special attention to security-related updates
- If the update is a major version, coordinate with the team
We follow the Conventional Commits specification:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or modifying testschore:- Maintenance taskssecurity:- Security-related changes
Example:
feat: add new validation function for email addresses
- Update documentation if needed
- Add tests for new functionality
- Ensure all tests pass
- Update the CHANGELOG.md (this will be done automatically by release-please)
- Request review from at least one maintainer
- All PRs require at least one approval
- Address all review comments
- Keep PRs focused and manageable in size
- Use meaningful commit messages
- Follow Go best practices and idioms
- Follow Effective Go
- Use
gofmtfor formatting - Follow our linting rules
- Write clear and concise comments
- Use meaningful variable and function names
- Write unit tests for new functionality
- Maintain or improve test coverage
- Use table-driven tests where appropriate
- Mock external dependencies
- Update README.md for significant changes
- Document all exported functions and types
- Include examples where helpful
- Keep documentation up to date with code changes