Skip to content

Commit 76714f7

Browse files
author
Matthew Fisher
committed
Merge pull request #1437 from deis/commit-guideline
ref(contributing): changes to the commit style guideline
2 parents 5679627 + e54b594 commit 76714f7

2 files changed

Lines changed: 32 additions & 25 deletions

File tree

CONTRIBUTING.md

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,43 +33,50 @@ This is a rough outline of what a contributor's workflow looks like:
3333

3434
Thanks for your contributions!
3535

36-
### Format of the Commit Message
36+
### Commit Style Guideline
3737

3838
We follow a rough convention for commit messages borrowed from CoreOS, who borrowed theirs
3939
from AngularJS. This is an example of a commit:
4040

41-
```
4241
feat(scripts/test-cluster): add a cluster test command
4342

4443
this uses tmux to setup a test cluster that you can easily kill and
4544
start for debugging.
46-
```
4745

48-
To make it more formal it looks something like this:
46+
To make it more formal, it looks something like this:
4947

50-
```
51-
{type}({scope}): {subject}
52-
<BLANK LINE>
53-
{body}
54-
<BLANK LINE>
55-
{footer}
56-
```
5748

58-
Any line of the commit message cannot be longer than 90 characters, with the subject line
59-
limited to 70 characters. This allows the message to be easier to read on github as well
49+
{type}({scope}): {subject}
50+
<BLANK LINE>
51+
{body}
52+
<BLANK LINE>
53+
{footer}
54+
55+
The {scope} can be anything specifying place of the commit change.
56+
57+
The {subject} needs to use imperative, present tense: “change”, not “changed” nor
58+
“changes”. The first letter should not be capitalized, and there is no dot (.) at the end.
59+
60+
Just like the {subject}, the message {body} needs to be in the present tense, and includes
61+
the motivation for the change, as well as a contrast with the previous behavior. The first
62+
letter in a paragraph must be capitalized.
63+
64+
All breaking changes need to be mentioned in the {footer} with the description of the
65+
change, the justification behind the change and any migration notes required.
66+
67+
Any line of the commit message cannot be longer than 72 characters, with the subject line
68+
limited to 50 characters. This allows the message to be easier to read on github as well
6069
as in various git tools.
6170

6271
The allowed {types} are as follows:
6372

64-
```
65-
feat -> feature
66-
fix -> bug fix
67-
docs -> documentation
68-
style -> formatting
69-
refactor
70-
test -> adding missing tests
71-
chore -> maintenance
72-
```
73+
feat -> feature
74+
fix -> bug fix
75+
docs -> documentation
76+
style -> formatting
77+
ref -> refactoring code
78+
test -> adding missing tests
79+
chore -> maintenance
7380

7481
### More Details on Commits
7582

docs/contributing/standards.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ Format of the Commit Message
194194
<BLANK LINE>
195195
{footer}
196196
197-
Any line of the commit message cannot be longer than 90 characters, with the subject
198-
line limited to 70 characters. This allows the message to be easier to read on github
197+
Any line of the commit message cannot be longer than 72 characters, with the subject
198+
line limited to 50 characters. This allows the message to be easier to read on github
199199
as well as in various git tools.
200200

201201
Subject Line
@@ -209,7 +209,7 @@ The allowed {types} are as follows:
209209
- fix -> bug fix
210210
- docs -> documentation
211211
- style -> formatting
212-
- refactor
212+
- ref -> refactoring code
213213
- test -> adding missing tests
214214
- chore -> maintenance
215215

0 commit comments

Comments
 (0)