Skip to content

Commit 4857f66

Browse files
committed
Add CONTRIBUTING.md for guidance on contributing
The initial guidance includes the markdown and git commit style. Signed-off-by: Jie Yu <[email protected]>
1 parent 1396c5b commit 4857f66

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

CONTRIBUTING.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# How to Contribute
2+
3+
CSI is under [Apache 2.0](LICENSE) and accepts contributions via GitHub pull requests.
4+
This document outlines some of the conventions on development workflow, commit message formatting, contact points and other resources to make it easier to get your contribution accepted.
5+
6+
## Markdown style
7+
8+
To keep consistency throughout the Markdown files in the CSI spec, all files should be formatted one sentence per line.
9+
This fixes two things: it makes diffing easier with git and it resolves fights about line wrapping length.
10+
For example, this paragraph will span three lines in the Markdown source.
11+
12+
## Git commit
13+
14+
### Sign your work
15+
16+
The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as an open-source patch.
17+
The rules are pretty simple: if you can certify the below (from [developercertificate.org](http://developercertificate.org/)):
18+
19+
```
20+
Developer Certificate of Origin
21+
Version 1.1
22+
23+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
24+
660 York Street, Suite 102,
25+
San Francisco, CA 94110 USA
26+
27+
Everyone is permitted to copy and distribute verbatim copies of this
28+
license document, but changing it is not allowed.
29+
30+
31+
Developer's Certificate of Origin 1.1
32+
33+
By making a contribution to this project, I certify that:
34+
35+
(a) The contribution was created in whole or in part by me and I
36+
have the right to submit it under the open source license
37+
indicated in the file; or
38+
39+
(b) The contribution is based upon previous work that, to the best
40+
of my knowledge, is covered under an appropriate open source
41+
license and I have the right under that license to submit that
42+
work with modifications, whether created in whole or in part
43+
by me, under the same open source license (unless I am
44+
permitted to submit under a different license), as indicated
45+
in the file; or
46+
47+
(c) The contribution was provided directly to me by some other
48+
person who certified (a), (b) or (c) and I have not modified
49+
it.
50+
51+
(d) I understand and agree that this project and the contribution
52+
are public and that a record of the contribution (including all
53+
personal information I submit with it, including my sign-off) is
54+
maintained indefinitely and may be redistributed consistent with
55+
this project or the open source license(s) involved.
56+
```
57+
58+
then you just add a line to every git commit message:
59+
60+
Signed-off-by: Joe Smith <[email protected]>
61+
62+
using your real name (sorry, no pseudonyms or anonymous contributions.)
63+
64+
You can add the sign off when creating the git commit via `git commit -s`.
65+
66+
### Commit Style
67+
68+
Simple house-keeping for clean git history.
69+
Read more on [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/) or the Discussion section of [`git-commit(1)`](http://git-scm.com/docs/git-commit).
70+
71+
* Separate the subject from body with a blank line.
72+
* Limit the subject line to 50 characters.
73+
* Capitalize the subject line.
74+
* Do not end the subject line with a period.
75+
* Use the imperative mood in the subject line.
76+
* Wrap the body at 72 characters.
77+
* Use the body to explain what and why vs. how.
78+
* If there was important/useful/essential conversation or information, copy or include a reference.
79+
* When possible, one keyword to scope the change in the subject (i.e. "README: ...", "tool: ...").

0 commit comments

Comments
 (0)