Thank you for your interest in contributing to IoTPowerShellAgent! This document provides guidelines and instructions for contributing.
- Be respectful and inclusive
- Welcome newcomers and help them learn
- Focus on constructive feedback
- Respect different viewpoints and experiences
- Fork the repository
- Clone your fork:
git clone https://github.com/Calvindd2f/IoTPowerShellAgent.git - Create a branch:
git checkout -b feature/your-feature-name - Make your changes
- Test your changes thoroughly
- Commit your changes:
git commit -m "Add feature: description" - Push to your fork:
git push origin feature/your-feature-name - Open a Pull Request
- .NET 8.0 SDK or later
- Windows 10/11 or Windows Server 2016+
- PowerShell 5.1 or later
- Visual Studio 2022 or VS Code (recommended)
dotnet restore
dotnet builddotnet test- Use meaningful variable and method names
- Follow C# naming conventions (PascalCase for public members, camelCase for private)
- Use
using varfor disposable objects where appropriate - Add XML documentation comments for public APIs
- Keep methods focused and single-purpose
- Use approved verbs (Get-, Set-, New-, etc.)
- Follow PowerShell naming conventions
- Include help comments for functions
- Always handle exceptions appropriately
- Provide meaningful error messages
- Log errors with appropriate severity levels
- Use structured error details for PowerShell errors
- Write unit tests for new features
- Ensure existing tests pass
- Test edge cases and error conditions
- For PowerShell executor tests, consider using Pester integration
If you add Pester tests, run them with:
Invoke-Pester -Path .\src\IoTPowerShellAgent.Tests.Pester\PowerShell\- Update documentation if needed
- Ensure all tests pass
- Update CHANGELOG.md if applicable
- Ensure your code follows the coding standards
- Request review from maintainers
- Address any feedback
Use clear, descriptive commit messages:
- Use present tense ("Add feature" not "Added feature")
- First line should be a summary (50 chars or less)
- Include more details in the body if needed
- Reference issues/PRs if applicable
Examples:
Add async execution with cancellation token support
Implements ExecutePowerShellAsync method with SemaphoreSlim
throttling to prevent blocking IoT Hub listener thread.
This project uses Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for backwards-compatible functionality
- PATCH version for backwards-compatible bug fixes
If you have questions, please:
- Open an issue for discussion
- Check existing issues and discussions
- Reach out to maintainers
Thank you for contributing!