So now we talked about your proposed change in the issue and it's time for you to implement the change and make it into a pull request (PR).
You cannot add code directly to our repository, you need to first get your own copy "a fork". GitHub makes this really simple, all you need to do is log in with your GitHub account, navigate to Pester repository and click the "Fork" button on the upper right. There is a helpful wizard to walk you through the process of forking and cloning the repository. At the end you should have a local copy of Pester on your computer.
If you don't have much experience with git, I suggest you download the GitHub desktop client that will make reviewing your changes really simple. I will be describing all the steps in commands that you need to put in command line. You can get to it by clicking the cog wheel in the application and selecting "Open in Git shell".
If you just forked and cloned as described in the Step 1 you can skip directly to step 3. Your code is already up-to-date.
Otherwise you should make sure that your fork and your local copy (clone) is up to date. We will be updating the master branch, because that is where you should always start when creating a new PR.
First you need to tell your repository where to find the official Pester repository by setting an upstream remote, you can find how to do that in this official guide.
Then you need to get the latest code from the main Pester repository (upstream) and merge it to your repository, here is another official guide on how to do that.. Finally you push the changes to your fork on the server (origin), by running
git push in the command line. You should repeat these steps every time you are starting a new PR, to make sure your code is up-to-date.
Here is the whole process from cloning the repository from an out-dated fork, till pushing the changes to the server:
Switch to your master branch and create a new so-called feature branch from it. This branch will hold all changes for the PR you are implementing. You could put your changes directly into the master branch, but that's not recommended.
This command will create a new branch based on the current branch (master) and will switch directly to it.
Now you can start implementing your changes. Make sure that your changes are relevant to the feature that you are implementing/the bug you are fixing. Avoid changing formatting and style of code that is not relevant to your changes.
Once you are done with you changes you need to commit them to your branch
In order to propose a new function to be added to Pester, we ask that you:
Fork the Pester repo.
Create a PS1 script with $FunctionName in the Functions directory.
Add your function to the FunctionsToExport key in the Pester module manifest.
Add the function to exported commands in the Pester module
& $script:SafeCommands['Export-ModuleMember'] New-Function
Create a Pester test file in the form of $FunctionName.Tests.ps1 in the Functions directory.
Do not dot source the function script in your tests. The function will already be included as part of the module.
Ensure your code works on PowerShell versions 2-5.
Run the Pester test suite.Get-Module Pester | Remove-ModuleImport-Module .\Pester.psd1Invoke-Pester -Path 'C:\Program Files\WindowsPowerShell\Modules\Pester\Functions'
Commit the change.
Submit a pull request.