Skip to content

Commit 5b1878c

Browse files
committed
Add contribution.md
1 parent 5bd6050 commit 5b1878c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributing
2+
3+
When contributing to this repository, please first open an an issue describing the update you wish to make, and read over our guidelines.
4+
5+
There are a few different recommended paths to get contributions into the released version of this SDK.
6+
7+
## Filing Issues
8+
The best way to get started with a contribution is to start a dialog with us. Sometimes features will be under development or out of scope for this SDK and it's best to check before starting work on contribution, especially for large work items.
9+
10+
## Adding Scenario-Based Cmdlets
11+
- Clone the repo - https://github.com/microsoftgraph/msgraph-sdk-powershell.git.
12+
- Identify the module(s) that you want add the custom cmdlets to. E.g. [Groups.DirectotyObject](https://github.com/microsoftgraph/msgraph-sdk-powershell/tree/dev/src/Beta/Groups.DirectoryObject/Groups.DirectoryObject).
13+
- Navigate to the module’s custom folder. E.g. [Groups.DirectoryObject/custom](https://github.com/microsoftgraph/msgraph-sdk-powershell/tree/dev/src/Beta/Groups.DirectoryObject/Groups.DirectoryObject/custom). In here, you will find a readme.md that has basic instructions on how to add custom cmdlets. A full guide can be found [here](https://github.com/Azure/autorest/blob/master/docs/powershell/customization.md#creating-a-new-cmdlet).
14+
- In the custom directory, add your custom cmdlet naming the file as `{Verb}Mg{Subject}_{Variant}.(cs|ps)`. This file will contain the implementation of your custom cmdlet. You can refer to [NewMgGroupMember_Create.cs](https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/dev/src/Beta/Groups.DirectoryObject/Groups.DirectoryObject/custom/NewMgGroupMember_Create.cs) as an example.
15+
- Once done, bump up the module version number in the module’s root [readme.md](https://github.com/microsoftgraph/msgraph-sdk-powershell/blob/dev/src/Beta/Groups.DirectoryObject/Groups.DirectoryObject/readme.md#versioning) then run `.\msgraph-sdk-powershell\tools\GenerateModules.ps1 -BetaGraphVersion -RepositoryApiKey *** -Pack -Build` to create, build and export the cmdlets to `..\exports` folder.
16+
17+
## Modifying Existing Cmdlets
18+
When it comes to modifying existing cmdlets, we recommend you use [AutoREST directive](https://github.com/Azure/autorest.powershell/blob/master/docs/directives.md#cmdlet-hiding-exportation-suppression).
19+
- Identify cmdlets you want to modify, and the modules they reside in.
20+
- In the module’s `readme.md`, add your directive in the AutoREST configuration sections to modify the lower-level cmdlets.
21+
22+

0 commit comments

Comments
 (0)