|
| 1 | +# Contributing to HTML5 Boilerplate |
| 2 | + |
| 3 | +♥ [HTML5 Boilerplate](https://html5boilerplate.com/) and want to get involved? |
| 4 | +Thanks! We're actively looking for folks interested in helping out and there |
| 5 | +are plenty of ways you can help! |
| 6 | + |
| 7 | +Please take a moment to review this document in order to make the contribution |
| 8 | +process easy and effective for everyone involved. |
| 9 | + |
| 10 | +Following these guidelines helps to communicate that you respect the time of |
| 11 | +the developers managing and developing this open source project. In return, |
| 12 | +they should reciprocate that respect in addressing your issue or assessing |
| 13 | +patches and features. |
| 14 | + |
| 15 | + |
| 16 | +## Using the issue tracker |
| 17 | + |
| 18 | +The [issue tracker](https://github.com/h5bp/html5-boilerplate/issues) is |
| 19 | +the preferred channel for [bug reports](#bugs), [features requests](#features) |
| 20 | +and [submitting pull requests](#pull-requests), but please respect the following |
| 21 | +restrictions: |
| 22 | + |
| 23 | +* Please **do not** use the issue tracker for personal support requests (use |
| 24 | + [Stack Overflow](https://stackoverflow.com/questions/tagged/html5boilerplate)). |
| 25 | + |
| 26 | +* Please **do not** derail or troll issues. Keep the discussion on topic and |
| 27 | + respect the opinions of others. |
| 28 | + |
| 29 | +* Please **do not** open issues or pull requests regarding the code in |
| 30 | + [`.htaccess`](https://github.com/h5bp/server-configs-apache), |
| 31 | + [`jQuery`](https://github.com/jquery/jquery/), |
| 32 | + [`Modernizr`](https://github.com/Modernizr/Modernizr) or |
| 33 | + [`Normalize.css`](https://github.com/necolas/normalize.css) (open them in |
| 34 | + their respective repositories). |
| 35 | + |
| 36 | + |
| 37 | +<a name="bugs"></a> |
| 38 | +## Bug reports |
| 39 | + |
| 40 | +A bug is a _demonstrable problem_ that is caused by the code in the repository. |
| 41 | +Good bug reports are extremely helpful - thank you! |
| 42 | + |
| 43 | +Guidelines for bug reports: |
| 44 | + |
| 45 | +1. **Use the GitHub issue search** — check if the issue has already been |
| 46 | + reported. |
| 47 | + |
| 48 | +2. **Check if the issue has been fixed** — try to reproduce it using the |
| 49 | + latest `master` or development branch in the repository. |
| 50 | + |
| 51 | +3. **Isolate the problem** — ideally create a [reduced test |
| 52 | + case](https://css-tricks.com/reduced-test-cases/) and a live example. |
| 53 | + |
| 54 | +A good bug report shouldn't leave others needing to chase you up for more |
| 55 | +information. Please try to be as detailed as possible in your report. What is |
| 56 | +your environment? What steps will reproduce the issue? What browser(s) and OS |
| 57 | +experience the problem? What would you expect to be the outcome? All these |
| 58 | +details will help people to fix any potential bugs. |
| 59 | + |
| 60 | +Example: |
| 61 | + |
| 62 | +> Short and descriptive example bug report title |
| 63 | +> |
| 64 | +> A summary of the issue and the browser/OS environment in which it occurs. If |
| 65 | +> suitable, include the steps required to reproduce the bug. |
| 66 | +> |
| 67 | +> 1. This is the first step |
| 68 | +> 2. This is the second step |
| 69 | +> 3. Further steps, etc. |
| 70 | +> |
| 71 | +> `<url>` - a link to the reduced test case |
| 72 | +> |
| 73 | +> Any other information you want to share that is relevant to the issue being |
| 74 | +> reported. This might include the lines of code that you have identified as |
| 75 | +> causing the bug, and potential solutions (and your opinions on their |
| 76 | +> merits). |
| 77 | +
|
| 78 | + |
| 79 | +<a name="features"></a> |
| 80 | +## Feature requests |
| 81 | + |
| 82 | +Feature requests are welcome. But take a moment to find out whether your idea |
| 83 | +fits with the scope and aims of the project. It's up to *you* to make a strong |
| 84 | +case to convince the project's developers of the merits of this feature. Please |
| 85 | +provide as much detail and context as possible. |
| 86 | + |
| 87 | + |
| 88 | +<a name="pull-requests"></a> |
| 89 | +## Pull requests |
| 90 | + |
| 91 | +Good pull requests - patches, improvements, new features - are a fantastic |
| 92 | +help. They should remain focused in scope and avoid containing unrelated |
| 93 | +commits. |
| 94 | + |
| 95 | +**Please ask first** before embarking on any significant pull request (e.g. |
| 96 | +implementing features, refactoring code, porting to a different language), |
| 97 | +otherwise you risk spending a lot of time working on something that the |
| 98 | +project's developers might not want to merge into the project. |
| 99 | + |
| 100 | +Please adhere to the coding conventions used throughout a project (indentation, |
| 101 | +accurate comments, etc.) and any other requirements (such as test coverage). |
| 102 | + |
| 103 | +Adhering to the following process is the best way to get your work |
| 104 | +included in the project: |
| 105 | + |
| 106 | +1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your |
| 107 | + fork, and configure the remotes: |
| 108 | + |
| 109 | + ```bash |
| 110 | + # Clone your fork of the repo into the current directory |
| 111 | + git clone https://github.com/<your-username>/html5-boilerplate.git |
| 112 | + # Navigate to the newly cloned directory |
| 113 | + cd html5-boilerplate |
| 114 | + # Assign the original repo to a remote called "upstream" |
| 115 | + git remote add upstream https://github.com/h5bp/html5-boilerplate.git |
| 116 | + ``` |
| 117 | + |
| 118 | +2. If you cloned a while ago, get the latest changes from upstream: |
| 119 | + |
| 120 | + ```bash |
| 121 | + git checkout master |
| 122 | + git pull upstream master |
| 123 | + ``` |
| 124 | + |
| 125 | +3. Create a new topic branch (off the main project development branch) to |
| 126 | + contain your feature, change, or fix: |
| 127 | + |
| 128 | + ```bash |
| 129 | + git checkout -b <topic-branch-name> |
| 130 | + ``` |
| 131 | + |
| 132 | +4. Commit your changes in logical chunks. Please adhere to these [git commit |
| 133 | + message guidelines](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) |
| 134 | + or your code is unlikely be merged into the main project. Use Git's |
| 135 | + [interactive rebase](https://help.github.com/articles/about-git-rebase/) |
| 136 | + feature to tidy up your commits before making them public. |
| 137 | + |
| 138 | +5. Locally merge (or rebase) the upstream development branch into your topic branch: |
| 139 | + |
| 140 | + ```bash |
| 141 | + git pull [--rebase] upstream master |
| 142 | + ``` |
| 143 | + |
| 144 | +6. Push your topic branch up to your fork: |
| 145 | + |
| 146 | + ```bash |
| 147 | + git push origin <topic-branch-name> |
| 148 | + ``` |
| 149 | + |
| 150 | +7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) |
| 151 | + with a clear title and description. |
| 152 | + |
| 153 | +**IMPORTANT**: By submitting a patch, you agree to allow the project |
| 154 | +owners to license your work under the terms of the [MIT License](LICENSE.txt). |
0 commit comments