|
2 | 2 |
|
3 | 3 | First of all, welcome! We're excited that you'd like to contribute. How would you like to help?
|
4 | 4 |
|
5 |
| -* [I'd like to report a bug or request an enhancement](#how-to-report-bugs-or-request-enhancements) |
6 |
| -* [I'd like to write new T-SQL checks](#how-to-write-new-t-sql-checks) |
7 |
| -* [I'd like to fix bugs in T-SQL checks](#how-to-fix-bugs-in-existing-t-sql-checks) |
8 |
| -* [I'd like to test checks written by someone else](#how-to-test-checks-written-by-someone-else) |
9 |
| -* [I'd like to write or update documentation](#how-to-write-or-update-documentation) |
10 |
| -* [I don't know how to upload code to GitHub](https://www.brentozar.com/archive/2015/07/pull-request-101-for-dbas-using-github/) |
| 5 | +* [I'd like to report a bug](#how-to-report-bugs) |
| 6 | +* [I'd like someone else to build something](#how-to-request-features) |
| 7 | +* [I'd like to build a new feature myself](#how-to-build-features-yourself) |
11 | 8 |
|
12 | 9 | Everyone here is expected to abide by the [Contributor Covenant Code of Conduct](#the-contributor-covenant-code-of-conduct).
|
13 | 10 |
|
14 | 11 | Wanna do something else, or have a question not answered here? Hop into Slack and ask us questions before you get started. [Get an invite to SQLCommunity.slack.com](https://sqlps.io/slack/), and we're in the [#FirstResponderKit channel](https://sqlcommunity.slack.com/messages/firstresponderkit/). We welcome newcomers, and there's always a way you can help.
|
15 | 12 |
|
16 |
| -## How to Report Bugs or Request Enhancements |
| 13 | +## How to Report Bugs |
17 | 14 |
|
18 |
| -Check out the [Github issues list]. Search for what you're interested in - there may already be an issue for it. Make sure to search through closed issues, too, because we often decline things that aren't a good fit for these tools. |
| 15 | +Check out the [Github issues list]. Search for what you're interested in - there may already be an issue for it. |
19 | 16 |
|
20 |
| -If you can't find a similar issue, go ahead and open your own. Include as much detail as you can - what you're seeing now, and what you'd like to see. |
| 17 | +Make sure to search through [closed issues list], too, because we may have already fixed the bug in the development branch. To try the most recent version of the code that we haven't released to the public yet, [download the dev branch version]. |
21 | 18 |
|
22 |
| -When requesting new checks, keep in mind that we want to focus on: |
| 19 | +If you can't find a similar issue, go ahead and open your own. Include as much detail as you can - what you're seeing now, and what you'd expect to see instead. |
23 | 20 |
|
24 |
| -* Actionable warnings - SQL Server folks are usually overwhelmed with data, and we only want to report on things they can actually do something about |
25 |
| -* Performance issues or reliability risks - if it's just a setting we don't agree with, let's set that aside |
26 |
| -* Things that end users or managers will notice - if we're going to have someone change a setting on their system, we want it to be worth their time |
| 21 | +## How to Request Features |
27 | 22 |
|
28 |
| -Now head on over to the [Github issues list] and get started. |
| 23 | +Open source is community-built software. Anyone is welcome to build things that would help make their job easier. |
29 | 24 |
|
30 |
| -## How to Write New T-SQL Checks |
| 25 | +Open source isn't free development, though. Working on these scripts is hard work: they have to work on case-sensitive instances, and on all supported versions of SQL Server (currently 2008 through 2017.) If you just waltz in and say, "Someone please bake me a cake," you're probably not going to get a cake. |
31 | 26 |
|
32 |
| -Before you code, check the [Github issues list] for what you're trying to do - there may already be an issue for it. Make sure to search through closed issues, too, because we often decline things that aren't a good fit for these tools. |
| 27 | +If you want something, you're going to either need to build it yourself, or convince someone else to devote their free time to your feature request. You can do that by sponsoring development (offering to hire a developer to build it for you), or getting people excited enough that they volunteer to build it for you. |
33 | 28 |
|
34 |
| -If you've got a new idea that isn't covered in an existing issue, open a Github issue for it. Outline what you'd like to do, and how you'd like to code it. This just helps make sure other users agree that it's a good idea to add to these tools. |
| 29 | +And good news! Lots of people have contributed their code over time. Here's how to get started. |
35 | 30 |
|
36 |
| -After a discussion, to start coding, [open a new Github branch.](https://www.brentozar.com/archive/2015/07/pull-request-101-for-dbas-using-github/) This lets you code in your own area without impacting anyone else. When your code is ready, test it on a case-sensitive instance of the oldest supported version of SQL Server (2008), and the newest version (2016). |
| 31 | +## How to Build Features Yourself |
37 | 32 |
|
38 |
| -When it's ready for review, make a pull request, and one of the core contributors can check your work. |
| 33 | +When you're ready to start coding, discuss it with the community. Check the [Github issues list] and the [closed issues list] because folks may have tried it in the past, or the community may have decided it's not a good fit for these tools. (Classic example - sp_Blitz isn't a security auditing tool.) |
39 | 34 |
|
40 |
| -## How to Fix Bugs in Existing T-SQL Checks |
| 35 | +If you can't find it in an existing issue, open a new Github issue for it. Outline what you'd like to do, why you'd like to do it, and optionally, how you'd think about coding it. This just helps make sure other users agree that it's a good idea to add to these tools. Other folks will respond to the idea, and if you get a warm reception, go for it! |
41 | 36 |
|
42 |
| -(stub) |
| 37 | +After your Github issue has gotten good responses from a couple of volunteers who are willing to test your work, get started by forking the project and working on your own server. The Github instructions are below - it isn't exactly easy, and we totally understand if you're not up for it. Thing is, we can't take code contributions via text requests - Github makes it way easier for us to compare your work versus the changes other people have made, and merge them all together. |
43 | 38 |
|
44 |
| -## How to Test Checks Written by Someone Else |
| 39 | +Note that if you're not ready to get started coding in the next week, or if you think you can't finish the feature in the next 30 days, you probably don't want to bother opening an issue. You're only going to feel guilty over not making progress, because we'll keep checking in with you to see how it's going. We don't want to have stale "someday I'll build that" issues in the list - we want to keep the open issues list easy to scan for folks who are trying to troubleshoot bugs and feature requests. |
45 | 40 |
|
46 |
| -(stub) |
| 41 | +### Git Flow for pull requests |
| 42 | +<a name="git-flow"></a> |
| 43 | + |
| 44 | +1. [Fork] the project, clone your fork, and configure the remotes: |
47 | 45 |
|
48 |
| -* Test only on case-sensitive instances. A surprising number of folks out there run on these. |
49 |
| -* Test on as many currently-supported versions of SQL Server as possible. At minimum, test on the oldest version (currently 2008), and the newest version (currently 2016). |
| 46 | + ```bash |
| 47 | + # Clone your fork of the repo into the current directory |
| 48 | + git clone git@github.com:<YOUR_USERNAME>/SQL-Server-First-Responder-Kit.git |
| 49 | + # Navigate to the newly cloned directory |
| 50 | + cd SQL-Server-First-Responder-Kit |
| 51 | + # Assign the original repo to a remote called "upstream" |
| 52 | + git remote add upstream https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/ |
| 53 | + ``` |
50 | 54 |
|
51 |
| -## How to Write or Update Documentation |
| 55 | +2. If you cloned a while ago, get the latest changes from upstream: |
52 | 56 |
|
53 |
| -(stub) |
| 57 | + ```bash |
| 58 | + git checkout master |
| 59 | + git pull upstream master |
| 60 | + ``` |
| 61 | + |
| 62 | +3. Create a new topic branch (off the main project development branch) to |
| 63 | + contain your feature, change, or fix: |
| 64 | + |
| 65 | + ```bash |
| 66 | + git checkout -b <topic-branch-name> |
| 67 | + ``` |
| 68 | + |
| 69 | +4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines] |
| 70 | + or your code is unlikely be merged into the main project. Use Git's [interactive rebase] |
| 71 | + feature to tidy up your commits before making them public. |
| 72 | + |
| 73 | +5. Locally merge (or rebase) the upstream development branch into your topic branch: |
| 74 | + |
| 75 | + ```bash |
| 76 | + git pull [--rebase] upstream master |
| 77 | + ``` |
| 78 | + |
| 79 | +6. Push your topic branch up to your fork: |
| 80 | + |
| 81 | + ```bash |
| 82 | + git push origin <topic-branch-name> |
| 83 | + ``` |
| 84 | + |
| 85 | +7. [Open a Pull Request] with a clear title and description. |
| 86 | + |
| 87 | +**IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the MIT [LICENSE] |
54 | 88 |
|
55 | 89 | ## The Contributor Covenant Code of Conduct
|
56 | 90 |
|
@@ -102,60 +136,14 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage], versi
|
102 | 136 | available at [http://contributor-covenant.org/version/1/4][version]
|
103 | 137 |
|
104 | 138 |
|
105 |
| -## Git Flow for pull requests |
106 |
| -<a name="git-flow"></a> |
107 |
| - |
108 |
| -1. [Fork] the project, clone your fork, and configure the remotes: |
109 |
| - |
110 |
| - ```bash |
111 |
| - # Clone your fork of the repo into the current directory |
112 |
| - git clone git@github.com:<YOUR_USERNAME>/SQL-Server-First-Responder-Kit.git |
113 |
| - # Navigate to the newly cloned directory |
114 |
| - cd SQL-Server-First-Responder-Kit |
115 |
| - # Assign the original repo to a remote called "upstream" |
116 |
| - git remote add upstream https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/ |
117 |
| - ``` |
118 |
| - |
119 |
| -2. If you cloned a while ago, get the latest changes from upstream: |
120 |
| - |
121 |
| - ```bash |
122 |
| - git checkout master |
123 |
| - git pull upstream master |
124 |
| - ``` |
125 |
| - |
126 |
| -3. Create a new topic branch (off the main project development branch) to |
127 |
| - contain your feature, change, or fix: |
128 |
| - |
129 |
| - ```bash |
130 |
| - git checkout -b <topic-branch-name> |
131 |
| - ``` |
132 |
| - |
133 |
| -4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines] |
134 |
| - or your code is unlikely be merged into the main project. Use Git's [interactive rebase] |
135 |
| - feature to tidy up your commits before making them public. |
136 |
| - |
137 |
| -5. Locally merge (or rebase) the upstream development branch into your topic branch: |
138 |
| - |
139 |
| - ```bash |
140 |
| - git pull [--rebase] upstream master |
141 |
| - ``` |
142 |
| - |
143 |
| -6. Push your topic branch up to your fork: |
144 |
| - |
145 |
| - ```bash |
146 |
| - git push origin <topic-branch-name> |
147 |
| - ``` |
148 |
| - |
149 |
| -7. [Open a Pull Request] with a clear title and description. |
150 |
| - |
151 |
| -**IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the MIT [LICENSE] |
152 |
| - |
153 | 139 |
|
154 | 140 | [homepage]: http://contributor-covenant.org
|
155 | 141 | [version]: http://contributor-covenant.org/version/1/4/
|
156 | 142 | [Github issues list]:https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues
|
| 143 | +[closed issues list]: https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues?q=is%3Aissue+is%3Aclosed |
157 | 144 | [Fork]:https://help.github.com/articles/fork-a-repo/
|
158 | 145 | [git commit message guidelines]:http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
159 | 146 | [interactive rebase]:https://help.github.com/articles/about-git-rebase/
|
160 | 147 | [Open a Pull Request]:https://help.github.com/articles/about-pull-requests/
|
161 | 148 | [LICENSE]:https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/blob/master/LICENSE.md
|
| 149 | +[download the dev branch version]: https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/archive/dev.zip |
0 commit comments