| OLD | NEW |
| (Empty) |
| 1 # Contributing to AngularDart | |
| 2 | |
| 3 We have set up a [milestone][communityMilestone] for issues which we believe are
an excellent | |
| 4 place to start if you are interested in contributing to AngularDart. | |
| 5 | |
| 6 We'd love for you to contribute to our source code and to make AngularDart even
better than it is | |
| 7 today! Here are the guidelines we'd like you to follow: | |
| 8 | |
| 9 ## Code of Conduct | |
| 10 Help us keep Angular open and inclusive. Please read and follow our [Code of Con
duct][coc]. | |
| 11 | |
| 12 ## Got a Question or Problem? | |
| 13 | |
| 14 If you have questions about how to use AngularDart, please direct these to the [
Google Group][groups] | |
| 15 discussion list or [StackOverflow][stackoverflow]. | |
| 16 | |
| 17 ## Found an Issue? | |
| 18 If you find a bug in the source code or a mistake in the documentation, you can
help us by | |
| 19 submitting and issue to our [GitHub Repository][github]. Even better you can sub
mit a Pull Request | |
| 20 with a fix. | |
| 21 | |
| 22 **Please see the Submission Guidelines below**. | |
| 23 | |
| 24 ## Want a Feature? | |
| 25 You can request a new feature by submitting an issue to our [GitHub Repository][
github]. If you | |
| 26 would like to implement a new feature then consider what kind of change it is: | |
| 27 | |
| 28 <!-- | |
| 29 * **Major Changes** that you wish to contribute to the project should be discuss
ed first on our | |
| 30 [dev mailing list][angular-dev] or [IRC][irc] so that we can better coordinate o
ur efforts, prevent | |
| 31 duplication of work, and help you to craft the change so that it is successfully
accepted into the | |
| 32 project. | |
| 33 --> | |
| 34 * **Small Changes** can be crafted and submitted to [GitHub Repository][github]
as a Pull Request. | |
| 35 | |
| 36 | |
| 37 ## Want a Doc Fix? | |
| 38 If you want to help improve the docs, it's a good idea to let others know what y
ou're working on to | |
| 39 minimize duplication of effort. Before starting, check out the issue queue. | |
| 40 | |
| 41 Comment on an issue to let others know what you're working on, or create a new i
ssue if your work | |
| 42 doesn't fit within the scope of any of the existing doc fix projects. | |
| 43 | |
| 44 For large fixes, please build and test the documentation before submitting the P
R to be sure you haven't | |
| 45 accidentally introduced any layout or formatting issues.You should also make sur
e that your commit message | |
| 46 is labeled "docs:" and follows the **Git Commit Guidelines** outlined below. | |
| 47 | |
| 48 ## Submission Guidelines | |
| 49 | |
| 50 ### Submitting an Issue | |
| 51 Before you submit your issue search the archive, maybe your question was already
answered. | |
| 52 | |
| 53 If your issue appears to be a bug, and hasn't been reported, open a new issue. | |
| 54 Help us to maximize the effort we can spend fixing issues and adding new | |
| 55 features, by not reporting duplicate issues. Providing the following informatio
n will increase the | |
| 56 chances of your issue being dealt with quickly: | |
| 57 | |
| 58 * **Overview of the issue** - if an error is being thrown a non-minified stack t
race helps | |
| 59 * **Motivation for or Use Case** - explain why this is a bug for you | |
| 60 * **Angular Version(s)** - is it a regression? | |
| 61 * **Browsers and Operating System** - is this a problem with all browsers or onl
y IE8? | |
| 62 * **Reproduce the error** - provide a live example (using [Runnable][runnable])
or a unambiguous set of steps. | |
| 63 * **Related issues** - has a similar issue been reported before? | |
| 64 * **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point t
o what might be | |
| 65 causing the problem (line of code or commit) | |
| 66 | |
| 67 **If you get help, help others. Good karma rulez!** | |
| 68 | |
| 69 ### Submitting a Pull Request | |
| 70 Before you submit your pull request consider the following guidelines: | |
| 71 | |
| 72 * Search [GitHub][github] for an open or closed Pull Request | |
| 73 that relates to your submission. You don't want to duplicate effort. | |
| 74 * Please sign our [Contributor License Agreement (CLA)](#signing-the-cla) before
sending pull | |
| 75 requests. We cannot accept code without this. | |
| 76 * Make your changes in a new git branch | |
| 77 | |
| 78 ```shell | |
| 79 git checkout -b my-fix-branch master | |
| 80 ``` | |
| 81 | |
| 82 * Create your patch, including appropriate test cases. | |
| 83 * Follow our [Coding Rules](#coding-rules) | |
| 84 * Commit your changes and create a descriptive commit message (the | |
| 85 commit message is used to generate release notes, please check out our | |
| 86 [commit message conventions](#commit-message-format) and our commit message pr
esubmit hook | |
| 87 `validate-commit-msg.js`): | |
| 88 | |
| 89 ```shell | |
| 90 git commit -a | |
| 91 ``` | |
| 92 | |
| 93 * Build your changes locally to ensure all the tests pass: see the [developer do
cumentation][dev-doc]. | |
| 94 | |
| 95 * Push your branch to Github: | |
| 96 | |
| 97 ```shell | |
| 98 git push origin my-fix-branch | |
| 99 ``` | |
| 100 | |
| 101 * In Github, send a pull request to `angular:master`. | |
| 102 * If we suggest changes then you can modify your branch, rebase and force a new
push to your GitHub | |
| 103 repository to update the Pull Request: | |
| 104 | |
| 105 ```shell | |
| 106 git rebase master -i | |
| 107 git push -f | |
| 108 ``` | |
| 109 | |
| 110 That's it! Thank you for your contribution! | |
| 111 | |
| 112 When the patch is reviewed and merged, you can safely delete your branch and pul
l the changes | |
| 113 from the main (upstream) repository: | |
| 114 | |
| 115 * Delete the remote branch on Github: | |
| 116 | |
| 117 ```shell | |
| 118 git push origin --delete my-fix-branch | |
| 119 ``` | |
| 120 | |
| 121 * Check out the master branch: | |
| 122 | |
| 123 ```shell | |
| 124 git checkout master -f | |
| 125 ``` | |
| 126 | |
| 127 * Delete the local branch: | |
| 128 | |
| 129 ```shell | |
| 130 git branch -D my-fix-branch | |
| 131 ``` | |
| 132 | |
| 133 * Update your master with the latest upstream version: | |
| 134 | |
| 135 ```shell | |
| 136 git pull --ff upstream master | |
| 137 ``` | |
| 138 ## Coding Rules | |
| 139 To ensure consistency throughout the source code, keep these rules in mind as yo
u are working: | |
| 140 | |
| 141 * All features or bug fixes **must be tested** by one or more [specs][unit-tes
ting]. | |
| 142 * All public API methods **must be documented** with [doc comments][doc-commen
ts]. | |
| 143 * With the exceptions listed below, we follow the rules contained in | |
| 144 [Google's Dart Style Guide][dart-style-guide]. | |
| 145 | |
| 146 ## Git Commit Guidelines | |
| 147 | |
| 148 We have very precise rules over how our git commit messages can be formatted. T
his leads to **more | |
| 149 readable messages** that are easy to follow when looking through the **project h
istory**. But also, | |
| 150 we use the git commit messages to **generate the AngularDart change log**. | |
| 151 | |
| 152 ### Commit Message Format | |
| 153 Each commit message consists of a **header**, a **body** and a **footer**. The
header has a special | |
| 154 format that includes a **type**, a **scope** and a **subject**: | |
| 155 | |
| 156 ``` | |
| 157 <type>(<scope>): <subject> | |
| 158 <BLANK LINE> | |
| 159 <body> | |
| 160 <BLANK LINE> | |
| 161 <footer> | |
| 162 ``` | |
| 163 | |
| 164 Any line of the commit message cannot be longer 100 characters! This allows the
message to be easier | |
| 165 to read on github as well as in various git tools. | |
| 166 | |
| 167 ### Type | |
| 168 Must be one of the following: | |
| 169 | |
| 170 * **feat**: A new feature | |
| 171 * **fix**: A bug fix | |
| 172 * **docs**: Documentation only changes | |
| 173 * **style**: Changes that do not affect the meaning of the code (white-space, fo
rmatting, missing | |
| 174 semi-colons, etc) | |
| 175 * **refactor**: A code change that neither fixes a bug or adds a feature | |
| 176 * **perf**: A code change that improves performance | |
| 177 * **test**: Adding missing tests | |
| 178 * **chore**: Changes to the build process or auxiliary tools and libraries such
as documentation | |
| 179 generation | |
| 180 | |
| 181 ### Scope | |
| 182 The scope could be anything specifying place of the commit change. For example `
$location`, | |
| 183 `$browser`, `$compile`, `$rootScope`, `ngHref`, `ngClick`, `ngView`, etc... | |
| 184 | |
| 185 ### Subject | |
| 186 The subject contains succinct description of the change: | |
| 187 | |
| 188 * use the imperative, present tense: "change" not "changed" nor "changes" | |
| 189 * don't capitalize first letter | |
| 190 * no dot (.) at the end | |
| 191 | |
| 192 ###Body | |
| 193 Just as in the **subject**, use the imperative, present tense: "change" not "cha
nged" nor "changes" | |
| 194 The body should include the motivation for the change and contrast this with pre
vious behavior. | |
| 195 | |
| 196 ###Footer | |
| 197 The footer should contain any information about **Breaking Changes** and is also
the place to | |
| 198 reference GitHub issues that this commit **Closes**. | |
| 199 | |
| 200 | |
| 201 A detailed explanation can be found in this [document][commit-message-format]. | |
| 202 | |
| 203 ## Signing the CLA | |
| 204 | |
| 205 Please sign our Contributor License Agreement (CLA) before sending pull requests
. For any code | |
| 206 changes to be accepted, the CLA must be signed. It's a quick process, we promise
! | |
| 207 | |
| 208 * For individuals we have a [simple click-through form][individual-cla]. | |
| 209 * For corporations we'll need you to | |
| 210 [print, sign and one of scan+email, fax or mail the form][corporate-cla]. | |
| 211 | |
| 212 | |
| 213 [groups]: https://groups.google.com/forum/#!forum/angular-dart | |
| 214 [stackoverflow]: http://stackoverflow.com/questions/tagged/angular.dart | |
| 215 [github]: https://github.com/angular/angular.dart | |
| 216 [runnable]: http://runnable.com/ | |
| 217 [unit-testing]: https://www.dartlang.org/articles/dart-unit-tests/ | |
| 218 [doc-comments]: https://www.dartlang.org/articles/doc-comment-guidelines/ | |
| 219 [dart-style-guide]: https://www.dartlang.org/articles/idiomatic-dart/ | |
| 220 [individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html | |
| 221 [corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html | |
| 222 [commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15I
JygNPiHORgU1_OOAqWjiDU5Y/edit# | |
| 223 [communityMilestone]: https://github.com/angular/angular.dart/issues?milestone=1
3&state=open | |
| 224 [coc]: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md | |
| 225 [dev-doc]: https://github.com/angular/angular.dart/blob/master/DEVELOPER.md | |
| OLD | NEW |