-
-
Notifications
You must be signed in to change notification settings - Fork 808
Your First Pull Request
Chrissy LeMaire edited this page Oct 15, 2016
·
30 revisions
Here are 8 basic steps to submitting a pull request, which is essentially asking to commit your code to the dbatools development repository.
- Create a github account then download and install GitHub Desktop
- Fork the dbatools repository
- Open your fork in GitHub Desktop
- Create a branch
- Publish your branch
- Code up a storm
- Commit your code to your local repository
- Create a pull request first to your local repo if you created a branch, then ultimately, to sqlcollaborative/dbatools/tree/development.
To learn more about branching, click here. We find branches extraordinarily useful when we're working on multiple issues. It's a way to isolate your changes and is a really cool thing all around.
Just click Publish. Some tutorials say to do this last, but we prefer doing it earlier on, if only for disaster recovery. Please ensure you've read the coding guidelines. Examine some of the functions to get familiar with the way dbatools is coded. If you have questions, we're more than happy to answer! If you're having design questions, don't be afraid to ask. This is a learning experience for all of us and the more SQL PowerShell coders we've got out there, the better!Basically, this is what you'll do if you're working on a new command
- Add your new command to the functions subdirectory, in the format of Verb-DbaNoun.ps1
- Add your new command name to the list of Functions in FunctionsToExport in dbatools.psd1
- Reload the module with -Force
To avoid committing the psd1, you can either discard the changes (but you'll have to put them back) or simply uncheck the box and don't commit it.
One of the best pieces of advice that we've read was "you always have enough time to compose a meaningful commit message." It's true. Please make your summary meaningful. Not necessarily long, just meaningful. We tend to add a description probably once every 20 commits if we can't sum up the commit well in the summary. Here's a list of commits to give you an idea of summaries.CONGRATS! We're so happy that you've decided to join us.
From here, there are a few additional steps
- A code review is performed by Chrissy LeMaire or another member of the code review team
- QA is performed by Daniel Alexander or another member of the QA team
- Your Pull Request will be approved after all required changes are performed
- Your additions will be merged with master during the monthly release cycle!
Thank you for helping to enhance the SQL Server DBA community!