Thank you for your interest in contributing to the KIRA Interoperability Microservices project! This document outlines the git workflow and contribution process.
This project follows a feature branch workflow with master as the main branch.
- master: The main production-ready branch. All features are merged here.
- feature/*: Feature branches for new functionality or improvements.
- fix/*: Branches for bug fixes.
- hotfix/*: Branches for urgent production fixes.
# Fork the repository on GitHub first, then:
git clone git@github.com:YOUR_USERNAME/interx.git
cd interx
git remote add upstream git@github.com:KiraCore/interx.gitFor team members with direct access:
git clone git@github.com:KiraCore/interx.git
cd interxAlways create a new branch from the latest master:
# Update your local master branch
git checkout master
git pull origin master
# Create and switch to a new feature branch
git checkout -b feature/your-feature-nameBranch naming conventions:
feature/description- For new featuresfix/description- For bug fixeshotfix/description- For urgent production fixes
- Write clean, maintainable code
- Follow existing code style and conventions
- Add tests for new functionality
- Update documentation as needed
- Keep commits focused and atomic
Write clear, descriptive commit messages:
git add .
git commit -m "brief: Description of changes"Commit message format:
- Use imperative mood ("Add feature" not "Added feature")
- First line should be concise (50 characters or less)
- Add detailed description in the body if needed
Examples:
cicd: Add new pipeline
fix: Resolve cosmos indexer timeout issue
feature: Implement Ethereum transaction signing
update: Enhance P2P load balancing logic
Regularly sync your branch with master to avoid conflicts:
git checkout master
git pull origin master
git checkout feature/your-feature-name
git rebase masterIf conflicts occur, resolve them and continue:
git add .
git rebase --continuegit push origin feature/your-feature-nameIf you've rebased, you may need to force push:
git push -f origin feature/your-feature-name- Go to the repository on GitHub
- Click "Pull requests" → "New pull request"
- Select your branch to merge into
master - Fill in the PR template with:
- Title: Clear, concise description of changes
- Description: What changes were made and why
- Testing: How the changes were tested
- Related Issues: Link any related issues
- Wait for code review from maintainers
- Address any feedback or requested changes
- Push additional commits to your branch as needed
- Once approved, a maintainer will merge your PR
Clean up your local branches:
git checkout master
git pull origin master
git branch -d feature/your-feature-nameThe project uses automated CI/CD pipelines. When you push to your branch or create a PR:
- Automated tests will run
- Code quality checks will be performed
- Build verification will occur
Ensure all checks pass before requesting review.
- Write self-documenting code with clear variable and function names
- Add comments for complex logic
- Follow Go best practices and idioms
- Handle errors appropriately
- Avoid code duplication
- Write unit tests for new functionality
- Ensure existing tests still pass
- Test edge cases and error conditions
- Run tests locally before pushing:
go test ./...- Test your changes with Docker Compose locally
- Ensure all microservices work together correctly
- Update configuration files if needed
- Document any new environment variables or config options
- Update README.md if adding new features
- Document API changes
- Add inline code documentation
- Update configuration examples
For information about creating releases, see RELEASE.md.
Releases are automatically created when feature branches are merged to master. The CI/CD pipeline handles:
- Version tagging
- Docker image building and publishing
- Automated changelog generation
- Image signing with cosign
- Release notes with SHA256 digests
- Check existing issues and discussions
- Read the README.md for architecture overview
- Read the RELEASE.md for release process
- Ask questions in pull request comments
- Contact maintainers if needed
- Be respectful and inclusive
- Provide constructive feedback
- Focus on the code, not the person
- Help others learn and grow
By contributing, you agree that your contributions will be licensed under the same license as the project.
Thank you for contributing to KIRA Interoperability Microservices! 🚀