Your contributions mean a lot to us, and we are excited to include the community at every opportunity.
Our goal is to make the process of contributing seamless and straightforward, whether you're:
- Reporting an issue
- Reviewing the existing code
- Proposing a correction
- Suggesting a new feature
- Interested in becoming a maintainer
We leverage GitHub for hosting our code, managing issues, feature requests, and for processing pull requests.
The most effective way to suggest changes to our codebase is through pull requests, following the Github Flow. We eagerly await your pull requests!
While the following workflow is tailored for Terraform submissions, it generally applies to other codes as well:
- Fork the repository and branch out from
main. - Ensure you've verified your code with
terraform validate,trivy,checkov, or other linting/security tools. 3. We have a script to help manage our common workflow -Run-AzTerraform.ps1 - Use
terraform fmt -recursiveor another formatter like prettier to format your Terraform code. We have a script for this as well -Terraform-Release.ps1 - Files and variables should adhere to the "What You See Is What You Get" (WYSIWYG) naming guideline. For instance, in a terraform repo:
terraform-${provider}-${purpose}/ # For example, the provider can be 'azurerm' and the purpose can be 'virtual-network'
|
├── ${purpose}/main.tf # The primary function of the Terraform code, e.g., for a virtual network, it would be named 'vnet.tf'
├── variables.tf # For input variables
├── LICENSE # Exclusively the MIT License
├── locals.tf # If locals are required
├── outputs.tf # For output variables
├── README.md # Documentation- Every
README.mdmust be informative. For Terraform, always include a code example that successfully executes the module, and a markdown-formatted output from terraform-docs:
terraform-docs markdown . >> README.mdOur Terraform-Release.ps1 script will help with this.
- Organize all variables alphabetically. In Terraform, this can be achieved with the following utility script:
Our
Terraform-Release.ps1script will help with this. - Now, you're ready to submit your pull request!
In essence, when you provide code changes, your contributions automatically fall under the same MIT License that governs the project. If this raises concerns, please reach out to the maintainers.
For tracking and addressing public bugs, we utilize GitHub issues. Simply open a new issue to report a bug. It's that simple!
Exceptional Bug Reports typically include:
- A concise summary or background
- Steps to reproduce the issue
- Be as detailed as possible
- Provide sample code when feasible
- Your initial expectations
- The actual result
- Additional notes or observations, such as potential reasons for the issue or attempted solutions
Comprehensive bug reports are invaluable to us. Truly, we can't emphasize this enough.
When contributing to the LibreDevOpsHelpers module, follow these conventions so the toolkit stays consistent and testable:
- Target PowerShell 7.2 or later. Start each module file with
Set-StrictMode -Version Latest. - Name every public function with the
Ldoprefix and an approved PowerShell verb (Get-Verblists them). - Give every function comment-based help (
.SYNOPSIS,.DESCRIPTION,.PARAMETER,.EXAMPLE,.OUTPUTS), a[CmdletBinding()]attribute, and an[OutputType()]. - Validate parameters (
ValidateNotNullOrEmpty,ValidateSet,ValidateRange, and similar). Accept secrets as[securestring]. - Log through
Write-LdoLog. Never useWrite-Hostfor logging and never callexitin a function;throwinstead so the caller controls flow. - After invoking a native CLI, check the result with
Assert-LdoLastExitCode. - Reuse the shared helpers in
LibreDevOpsHelpers.Utils(for exampleGet-LdoPublicIpAddress,Assert-LdoLastExitCode) rather than duplicating them. - Use plain ASCII only. No smart quotes, em or en dashes, ellipsis glyphs, or emoji.
- Add Pester tests under
tests/for every new function. Tests must not touch the network, Azure, or external CLIs; mock those boundaries. - When you add or rename a public function, register the new nested module (if any) in
LibreDevOpsHelpers.psd1NestedModulesand update the explicitFunctionsToExportlist. - Run
./Invoke-Tests.ps1before opening a PR. It must be analyzer clean (no Error or Warning) and all tests must pass.
By offering your contributions, you consent to license them under the MIT License.