Contributing

Prerequisites

How to Contribute

1. Fork the Repository

Create your own copy of the project by clicking the “Fork” button at the top right of the repository page.

2. Clone Your Fork

Download your fork to your local machine:

git clone https://github.com/OWNER/PSModuleTemplate.git
cd PSModuleTemplate

3. Create a Branch

Make a new branch for your changes (don’t work directly on main/master):

git checkout -b your-branch-name

Use a descriptive branch name like fix-bug-123 or add-feature-xyz.

4. Make Your Changes

Edit code, add features, fix bugs, or improve documentation as needed.

5. Test Your Changes

Before committing, ensure your changes work correctly:

Initial Setup

make setup

This will set up an example module for testing.

Install Dependencies

make depend

This installs any required modules defined in PSDepend.psd1. If your changes add a new module dependency, make sure it is listed in both PSDepend.psd1 and in RequiredModules in the module manifest.

Build the Module

make build

Review the build output to ensure there are no errors.

Run Pester Tests

make pester

All tests should pass before submitting your pull request.

Additional Testing Requirements

6. Commit Your Changes

Save your work with clear, descriptive commit messages:

git add .
git commit -m "Brief description of your changes"

7. Push to Your Fork

Upload your branch to your GitHub fork:

git push origin your-branch-name

8. Open a Pull Request

Go to the original repository on GitHub and click “New Pull Request”. Select your fork and branch, then provide a clear description of your changes.

Guidelines

Questions?

If you have questions or need help, feel free to open an issue.

Thank you for contributing!