Thank you for your interest in contributing to CodeFlow Azure Setup scripts! This document provides guidelines for PowerShell script contributions.
- Fork the repository on GitHub
- Clone your fork locally
- Set up development environment:
- PowerShell 7+
- Azure CLI installed and configured
- PSScriptAnalyzer (for linting)
- Create a branch for your changes
- PowerShell 7+
- Azure CLI
- PSScriptAnalyzer:
Install-Module -Name PSScriptAnalyzer -Scope CurrentUser
- Follow PSScriptAnalyzer rules
- Use approved verbs for function names
- Add comprehensive help comments
- Use proper error handling with try-catch
- Use
$ErrorActionPreference = 'Stop'for scripts
Before committing:
# Lint scripts
Invoke-ScriptAnalyzer -Path .\scripts\*.ps1
# Validate syntax
Get-ChildItem -Recurse -Filter "*.ps1" | ForEach-Object {
$null = [System.Management.Automation.PSParser]::Tokenize(
(Get-Content $_.FullName -Raw), [ref]$null
)
}- Validate scripts with PSScriptAnalyzer
- Test scripts in a development environment
- Update documentation as needed
- Create a pull request with a clear description
- Scripts pass PSScriptAnalyzer
- Scripts tested in development environment
- Error handling implemented
- Documentation updated
- No hardcoded credentials
Follow Conventional Commits:
fix(setup): resolve Azure login issue
Add retry logic for Azure CLI login.
Improve error messages for authentication failures.
Fixes #123
Use GitHub Issues with:
- Clear description
- Affected script
- Steps to reproduce
- Error messages
- PowerShell version
- Azure CLI version
- GitHub Discussions: For questions
- GitHub Issues: For bugs and features
- See main CONTRIBUTING guide for more details
Thank you for contributing! 🎉