Thank you for your interest in contributing to Reliable.HttpClient! This guide will help you get started.
- Git
- .NET 8.0 SDK or later
- Your favorite IDE (Visual Studio, VS Code, Rider, etc.)
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/Reliable.HttpClient.git cd Reliable.HttpClient -
Restore dependencies and build:
dotnet restore dotnet build
-
Run tests to ensure everything works:
dotnet test
- Create a new branch for each feature or bug fix
- Use descriptive branch names:
feature/add-timeout-configurationfix/circuit-breaker-race-conditiondocs/update-configuration-examples
We follow standard .NET coding conventions:
- Use PascalCase for public members
- Use camelCase for private fields and local variables
- Add XML documentation for public APIs
- Keep methods focused and small
- Write descriptive variable and method names
- All new features must include tests
- Aim for high test coverage
- Use descriptive test names that explain the scenario
- Follow the Arrange-Act-Assert pattern
- Use FluentAssertions for assertions
Example:
[Fact]
public void AddResilience_WithNullOptions_ShouldThrowArgumentNullException()
{
// Arrange
var services = new ServiceCollection();
var builder = services.AddHttpClient("test");
// Act & Assert
var exception = Assert.Throws<ArgumentNullException>(() =>
builder.AddResilience((HttpClientOptions)null));
exception.ParamName.Should().Be("options");
}- Update documentation for any API changes
- Add examples for new features
- Update the changelog for breaking changes
- Ensure all public APIs have XML documentation
-
Ensure all tests pass:
dotnet test -
Check for code style issues:
dotnet format --verify-no-changes
-
Update documentation if needed
-
Add or update tests for your changes
-
Title: Use a clear, descriptive title
- ✅ "Add support for custom timeout configuration"
- ❌ "Fix stuff"
-
Description: Include:
- What changes were made and why
- Any breaking changes
- Links to related issues
- Screenshots/examples if applicable
-
Scope: Keep PRs focused on a single feature or fix
-
Tests: Include tests for new functionality
-
Documentation: Update docs for user-facing changes
## Description
Brief description of the changes.
## Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
## Testing
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
## Checklist
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings- Simplicity First: Default configuration should work for 80% of use cases
- Explicit Configuration: Advanced options should be clearly documented
- Fail Fast: Invalid configurations should throw exceptions early
- Backward Compatibility: Avoid breaking changes when possible
- Consistent Patterns: Follow existing conventions in the codebase
- Minimize allocations in hot paths
- Use
ValueTaskwhere appropriate - Consider thread safety for shared resources
- Profile performance for critical paths
- Use specific exception types for different error scenarios
- Provide clear, actionable error messages
- Include context information in exceptions
- Handle edge cases gracefully
When reporting bugs, please include:
- Clear description of the issue
- Steps to reproduce
- Expected vs actual behavior
- Environment details (.NET version, OS, etc.)
- Minimal code sample that demonstrates the issue
For new features:
- Explain the use case and problem you're solving
- Provide examples of how the feature would be used
- Consider backward compatibility implications
- Discuss alternative approaches
- Fix typos and grammar
- Add missing examples
- Improve clarity of explanations
- Update outdated information
- Bug fixes
- New features
- Performance improvements
- Code refactoring
We follow semantic versioning (SemVer):
- Major (1.0.0): Breaking changes
- Minor (0.1.0): New features, backward compatible
- Patch (0.0.1): Bug fixes, backward compatible
- Be respectful and inclusive
- Welcome newcomers and help them succeed
- Focus on constructive feedback
- Assume good intentions
- Check existing issues and documentation first
- Ask questions in GitHub Discussions
- Join our community discussions
- Provide context when asking for help
Contributors are recognized in:
- Release notes for significant contributions
- GitHub contributors page
- Special thanks for major features or fixes
By contributing to Reliable.HttpClient, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to Reliable.HttpClient! Your help makes this project better for everyone. 🎉