|
| 1 | +# Contributing to Azure Event Grid Simulator |
| 2 | + |
| 3 | +Thank you for your interest in contributing to Azure Event Grid Simulator! This document provides guidelines and information for contributors. |
| 4 | + |
| 5 | +> **Note:** This simulator is intended for **local development and testing only**. When contributing, keep in mind that features should support local development scenarios, not production use cases. |
| 6 | +
|
| 7 | +## Getting Started |
| 8 | + |
| 9 | +### Prerequisites |
| 10 | + |
| 11 | +- .NET 10.0 SDK (required by global.json to build) |
| 12 | +- Git |
| 13 | +- Your favorite IDE (Visual Studio, VS Code, Rider, etc.) |
| 14 | + |
| 15 | +> **Note:** While .NET 10.0 SDK is required to build, the project multi-targets .NET 8.0, 9.0, and 10.0 to support users on any of these runtimes. |
| 16 | +
|
| 17 | +### Setting Up the Development Environment |
| 18 | + |
| 19 | +1. Fork the repository |
| 20 | +2. Clone your fork: |
| 21 | + ```bash |
| 22 | + git clone https://github.com/YOUR_USERNAME/AzureEventGridSimulator.git |
| 23 | + cd AzureEventGridSimulator |
| 24 | + ``` |
| 25 | +3. Restore dependencies: |
| 26 | + ```bash |
| 27 | + dotnet restore src/AzureEventGridSimulator.sln |
| 28 | + ``` |
| 29 | +4. Build the project: |
| 30 | + ```bash |
| 31 | + dotnet build src/AzureEventGridSimulator.sln |
| 32 | + ``` |
| 33 | +5. Run tests: |
| 34 | + ```bash |
| 35 | + dotnet test src/AzureEventGridSimulator.sln |
| 36 | + ``` |
| 37 | +Git hooks are configured automatically on first build to validate commit messages follow conventional commit format. |
| 38 | + |
| 39 | +## Code Style |
| 40 | + |
| 41 | +This project uses [CSharpier](https://csharpier.com/) for code formatting. CSharpier runs automatically on every build, so your code will be formatted before compilation. |
| 42 | + |
| 43 | +To manually format the code: |
| 44 | +```bash |
| 45 | +dotnet tool restore |
| 46 | +dotnet csharpier format src |
| 47 | +``` |
| 48 | + |
| 49 | +## Making Changes |
| 50 | + |
| 51 | +### Branch Naming |
| 52 | + |
| 53 | +Create a descriptive branch name for your changes: |
| 54 | +- `feature/add-new-subscriber-type` |
| 55 | +- `fix/validation-error-handling` |
| 56 | +- `docs/update-readme` |
| 57 | + |
| 58 | +### Commit Messages |
| 59 | + |
| 60 | +This project uses [Conventional Commits](https://www.conventionalcommits.org/). Please format your commit messages as: |
| 61 | + |
| 62 | +- `feat:` - A new feature |
| 63 | +- `fix:` - A bug fix |
| 64 | +- `docs:` - Documentation changes |
| 65 | +- `chore:` - Maintenance tasks |
| 66 | +- `refactor:` - Code refactoring |
| 67 | +- `test:` - Adding or updating tests |
| 68 | + |
| 69 | +Example: `feat: add Azure Storage Queue subscriber support` |
| 70 | + |
| 71 | +### Pull Requests |
| 72 | + |
| 73 | +1. Ensure your code builds without errors |
| 74 | +2. Ensure all tests pass |
| 75 | +3. Update documentation if needed |
| 76 | +4. Fill out the pull request template |
| 77 | +5. Link any related issues |
| 78 | + |
| 79 | +## Testing |
| 80 | + |
| 81 | +- Write tests for new functionality |
| 82 | +- Ensure existing tests pass before submitting a PR |
| 83 | +- Run the full test suite: |
| 84 | + ```bash |
| 85 | + dotnet test src/AzureEventGridSimulator.sln |
| 86 | + ``` |
| 87 | + |
| 88 | +## Reporting Issues |
| 89 | + |
| 90 | +- Use the GitHub issue templates for bug reports and feature requests |
| 91 | +- Search existing issues before creating a new one |
| 92 | +- Provide as much detail as possible |
| 93 | + |
| 94 | +## Code of Conduct |
| 95 | + |
| 96 | +This project follows the [Contributor Covenant Code of Conduct](../CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. |
| 97 | + |
| 98 | +## Questions? |
| 99 | + |
| 100 | +If you have questions, feel free to open a discussion or issue on GitHub. |
| 101 | + |
| 102 | +## License |
| 103 | + |
| 104 | +By contributing, you agree that your contributions will be licensed under the MIT License. |
0 commit comments