|
| 1 | +# Commit Format |
| 2 | + |
| 3 | +The commit format follows a pattern similar to the [AngularJS commit message conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit) |
| 4 | + |
| 5 | + |
| 6 | +## Why it's needed |
| 7 | + |
| 8 | +* allow changelog file generation |
| 9 | +* allow for a common, structured way of communicating changes |
| 10 | +* allow for filtering commits by category |
| 11 | + |
| 12 | +## Commit message format |
| 13 | + |
| 14 | +``` |
| 15 | +[type]([scope]): [subject] |
| 16 | +[New line] |
| 17 | +[body] |
| 18 | +``` |
| 19 | + |
| 20 | +Each line of the commit message should not exceed 100 characters to allow easier reading on smaller screens. |
| 21 | + |
| 22 | +### Subject line |
| 23 | +The Subject line contains a summarized description of the change. |
| 24 | + |
| 25 | +#### Allowed `<type>` |
| 26 | +* feat (feature) |
| 27 | +* fix (bug fix) |
| 28 | +* docs (documentation) |
| 29 | +* style (formatting, missing semi colons, …) |
| 30 | +* refactor |
| 31 | +* test (when adding missing tests) |
| 32 | +* chore (maintain) |
| 33 | + |
| 34 | +#### Allowed `<scope>` |
| 35 | +Scope could be anything specifying the place of the commit change. Build, Parsing, File operations, etc... |
| 36 | + |
| 37 | +#### `<subject>` text |
| 38 | +* use imperative, present tense: “change” not “changed” nor “changes” |
| 39 | +* don't capitalize first letter |
| 40 | +* no dot (.) at the end |
| 41 | + |
| 42 | +### Message body |
| 43 | +* just as in <subject> use imperative, present tense: “change” not “changed” nor “changes” |
| 44 | +* includes motivation for the change and contrasts with previous behavior |
| 45 | + |
| 46 | +http://365git.tumblr.com/post/3308646748/writing-git-commit-messages |
| 47 | +http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html |
| 48 | + |
| 49 | +Examples |
| 50 | +-------- |
| 51 | +``` |
| 52 | +feat($browser): onUrlChange event (popstate/hashchange/polling) |
| 53 | +
|
| 54 | +Added new event to $browser: |
| 55 | +- forward popstate event if available |
| 56 | +- forward hashchange event if popstate not available |
| 57 | +- do polling when neither popstate nor hashchange available |
| 58 | +``` |
| 59 | + |
| 60 | +``` |
| 61 | +fix($compile): couple of unit tests for IE9 |
| 62 | +
|
| 63 | +Older IEs serialize html uppercased, but IE9 does not... |
| 64 | +Would be better to expect case insensitive, unfortunately jasmine does |
| 65 | +not allow to user regexps for throw expectations. |
| 66 | +``` |
| 67 | + |
| 68 | +``` |
| 69 | +feat(directive): ng:disabled, ng:checked, ng:multiple, ng:readonly, ng:selected |
| 70 | +
|
| 71 | +New directives for proper binding these attributes in older browsers (IE). |
| 72 | +Added coresponding description, live examples and e2e tests. |
| 73 | +``` |
| 74 | + |
| 75 | +``` |
| 76 | +style($location): add couple of missing semi colons |
| 77 | +``` |
| 78 | + |
| 79 | +``` |
| 80 | +docs(guide): updated fixed docs from Google Docs |
| 81 | +
|
| 82 | +Couple of typos fixed: |
| 83 | +- indentation |
| 84 | +- batchLogbatchLog -> batchLog |
| 85 | +- start periodic checking |
| 86 | +- missing brace |
| 87 | +``` |
0 commit comments