Skip to content

How To Contribute

Tom Janetscheck edited this page Nov 2, 2021 · 2 revisions

How to contribute

  1. First of all, you need to create a GitHub account or login with your existing one. With this account, you'll be able to create your own repositories, but also to contribute to others.
  2. We encourage you to create your own fork of our repository. To do this, you just need to click the Fork button in the upper right corner when navigating through the Azure-Security-Center repo.
  3. The fork is your own copy of the Microsoft Defender for Cloud repository, which means that you have all access rights you need to create, delete, or change files and branches. We encourage you to use Visual Studio Code alongside GitHub Desktop to create new artifacts or to propose changes. VSCode will integrate with GitHub Desktop so you can benefit from it as an IDE and source control.
  4. Once you have forked the repository, you can find the copy in your own GitHub account under https://github.com/yourAccountName/Microsoft-Defender-for-Cloud. Once you navigate there, make sure to click the green Code button and copy the URL to clone with https.
  5. In VSCode, make sure to login with your GitHub user account (usually you only need to do that once), open the terminal and navigate to the folder you want to create a local copy of your fork in. For example, you can create a local folder called GitHub. Once you've created this folder, make sure to navigate into it using 'cd foldername'.
  6. Once you've navigated to your root folder (in this example the folder called GitHub), you can clone your forked repository from GitHub to your local machine using the command 'git clone https://github.com/yourAccountName/Microsoft-Defender-for-Cloud'. Make sure to change the account name according to your GitHub account. This command will create a Microsoft-Defender-for-Cloud folder within your GitHub folder, which will contain a local copy of all the files within your forked repository.
  7. You can either use the branches that already exist in your fork, or create new branches, depending on how you want to structure your local repository. You can switch branches with a click on the branch name in the lower left corner of VSCode. When you are working with several branches, make sure to always apply your changes to the correct branch to avoid conflicts.
  8. Once you're done, save your file, stage your changes and commit them to your remote branch. Your changes will then be uploaded to your online GitHub repository.
  9. Now you open your browser and navigate to the Microsoft-Defender-for-Cloud repository. Select Pull requests and click on the green New Pull Request button.
  10. Click on the compare across forks link. As the head repository, select your personal fork and the branch you've commited your changes to.
  11. Make sure the commits you see below reflect the changes you have made and want to have merged to the official ASC repo. Then click on the green Create pull request button. Enter a title and comments so we know what your artifact will do.
  12. We will review your contribution within one week and either comment with necessary changes, or merge it to our master branch.