|
| 1 | +# Contributing to StageCoder |
| 2 | + |
| 3 | +You are more than welcome to contribute to the StageCoder module, whether it is [Pull Requests](#pull-requests), [Feature Suggestions](#feature-suggestions) or [Bug Reports](#bug-reports)! |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +- Fork this repo (see [this forking guide](https://guides.github.com/activities/forking/) for more information). |
| 8 | +- Checkout the repo locally with `git clone git@github.com:{your_username}/StageCoder-PowerShell.git`. |
| 9 | +- If you haven't already, you will need the [PlatyPs](https://github.com/PowerShell/platyPS) PowerShell Module to generate command help and docs. |
| 10 | + |
| 11 | +## Developing |
| 12 | + |
| 13 | +### Structure |
| 14 | + |
| 15 | +The repo is organized as below: |
| 16 | + |
| 17 | +- **Private** (`Src/Private`): All private functions used by the module. |
| 18 | +- **Public** (`Src/Public`): All functions exported by the module. |
| 19 | +- **Tests** (`Tests`): Pester tests executed at Pull Request. |
| 20 | +- **Help** (`Docs/Help`): Markdown help files for external help. |
| 21 | + |
| 22 | +### Running the module locally |
| 23 | + |
| 24 | +- Import the module: |
| 25 | + |
| 26 | +```powershell |
| 27 | +Import-Module ./Src/StageCoder.psd1 |
| 28 | +``` |
| 29 | + |
| 30 | +### platyPS |
| 31 | + |
| 32 | +[platyPS](https://github.com/PowerShell/platyPS) is used to write the external help in markdown. When contributing always make sure that the changes are added to the help file. |
| 33 | + |
| 34 | +#### Quickstart |
| 35 | + |
| 36 | +- Install the platyPS module from the [PowerShell Gallery](https://powershellgallery.com): |
| 37 | + |
| 38 | +```powershell |
| 39 | +Install-Module -Name platyPS -Scope CurrentUser |
| 40 | +Import-Module platyPS |
| 41 | +``` |
| 42 | + |
| 43 | +- Create initial Markdown help file for `StageCoder` module (This will only create help files for new commands, existing files will not be overwritten): |
| 44 | + |
| 45 | +```powershell |
| 46 | +# you should have module imported in the session |
| 47 | +Import-Module './Src/StageCoder.psd1' |
| 48 | +New-MarkdownHelp -Command 'My-NewCommand' -OutputFolder './Docs/Help' |
| 49 | +``` |
| 50 | + |
| 51 | +Edit the markdown file(s) in the `./Docs/Help` folder and populate `{{ ... }}` placeholders with missed help content. |
| 52 | + |
| 53 | +- If you've made a lot of changes to the module code, you can easily update the markdown file(s) automatically with: |
| 54 | + |
| 55 | +```powershell |
| 56 | +# re-import your module with latest changes |
| 57 | +Import-Module './Src/StageCoder.psd1' -Force |
| 58 | +Update-MarkdownHelp './Docs/Help' |
| 59 | +``` |
| 60 | + |
| 61 | +## Pull Requests |
| 62 | + |
| 63 | +If you like to start contributing to the StageCoder module. Please make sure that there is a related issue to link to your PR. |
| 64 | + |
| 65 | +- Make sure that the issue is tagged in the PR, e.g. "fixes #45" |
| 66 | +- Write a short but informative commit message, it will be added to the release notes. |
| 67 | + |
| 68 | +## Feature Suggestions |
| 69 | + |
| 70 | +- Please first search [Open Issues](https://github.com/StageCoder/StageCoder-PowerShell/Issues) before opening an issue to check whether your feature has already been suggested. |
| 71 | +If it has, feel free to add your own comments to the existing issue. |
| 72 | +- Ensure you have included a "What?" - what your feature entails, being as specific as possible, and giving mocked-up syntax examples where possible. |
| 73 | +- Ensure you have included a "Why?" - what the benefit of including this feature will be. |
| 74 | +- Use the "Feature Request" issue template [here](https://github.com/StageCoder/StageCoder-PowerShell/issues/new/choose) to submit your request. |
| 75 | + |
| 76 | +## Bug Reports |
| 77 | + |
| 78 | +- Please first search [Open Issues](https://github.com/StageCoder/StageCoder-PowerShell/issues) before opening an issue, to see if it has already been reported. |
| 79 | +- Try to be as specific as possible, including the version of the ADOPS PowerShell module, PowerShell version and OS used to reproduce the issue, and any example files or snippets of ADOPS code needed to reproduce it. |
| 80 | +- Use the "Bug Report" issue template [here](https://github.com/StageCoder/StageCoder-PowerShell/issues/new/choose) to submit your request. |
0 commit comments