Thank you for your interest in contributing to NetMediate! We welcome contributions from the community and are pleased to have you join us.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Code Style
- Testing
- Submitting Changes
- Release Process
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
- .NET 9.0 SDK or later
- Git
- A GitHub account
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/yourusername/net-mediate.git cd net-mediate -
Add the original repository as upstream:
git remote add upstream https://github.com/schivei/net-mediate.git
-
Restore dependencies:
dotnet restore
-
Build the project:
dotnet build
-
Run tests to ensure everything works:
dotnet test
Use descriptive branch names with the following prefixes:
feature/- New featuresbugfix/- Bug fixeshotfix/- Critical fixesdocs/- Documentation updatesrefactor/- Code refactoring
Example: feature/add-new-mediator-pattern
Follow conventional commit format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
Example: feat: add support for async request handlers
This project uses CSharpier for code formatting. All code must be properly formatted before submission.
Run the formatter before committing:
dotnet csharpier format .Verify your code meets formatting standards:
dotnet csharpier check .Note: The CI pipeline will automatically check code formatting and fail if standards are not met.
- Write unit tests for all new functionality
- Aim for high test coverage (minimum 95% required)
- Use descriptive test names that explain what is being tested
- Follow the Arrange-Act-Assert pattern
# Run all tests
dotnet test
# Run tests with coverage
dotnet test --collect:"XPlat Code Coverage"- All pull requests must maintain at least 95% code coverage
- The CI pipeline will enforce this requirement
- Coverage reports are automatically generated and uploaded to Codecov
-
Ensure your branch is up to date with the main branch:
git fetch upstream git checkout main git merge upstream/main git checkout your-feature-branch git rebase main
-
Run all tests and ensure they pass:
dotnet test -
Format your code:
dotnet csharpier format . -
Push your changes to your fork:
git push origin your-feature-branch
-
Create a pull request through GitHub's web interface
- Fill out the pull request template completely
- Provide a clear description of the changes
- Reference any related issues
- Ensure all CI checks pass
- Be responsive to code review feedback
- All pull requests require review before merging
- CI checks must pass (build, tests, formatting, coverage)
- Code coverage must be at least 95%
- Changes may require documentation updates
Releases are handled by maintainers:
- Version tags follow semantic versioning (e.g.,
v1.2.3) - Releases are automatically built and published to NuGet
- Release notes are generated automatically from commit messages
- Create an issue for bugs or feature requests
- Use discussions for questions about usage
- Check existing issues and documentation first
Contributors are recognized in our release notes and README. Thank you for making NetMediate better!