Skip to content

Commit f993dcb

Browse files
committedNov 4, 2017
doc: add contributing guide and license (#61)
* doc: add contributing guide and license * doc: include license and contributing.md in readme
1 parent af611d1 commit f993dcb

File tree

3 files changed

+148
-2
lines changed

3 files changed

+148
-2
lines changed
 

‎CONTRIBUTING.md

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Contributing to node-core-utils
2+
3+
This document will guide you through the contribution process.
4+
5+
### Step 1: Fork
6+
7+
Fork the project [on GitHub](https://github.com/joyeecheung/node-core-utils)
8+
and check out your copy locally.
9+
10+
```bash
11+
$ git clone git@github.com:username/node-core-utils.git
12+
$ cd node-core-utils
13+
$ git remote add upstream git@github.com:joyeecheung/node-core-utils.git
14+
```
15+
16+
#### Which branch?
17+
18+
For developing new features and bug fixes, the `master` branch should be pulled
19+
and built upon.
20+
21+
### Step 2: Branch
22+
23+
Create a feature branch and start hacking:
24+
25+
```bash
26+
$ git checkout -b my-feature-branch -t origin/my-feature-branch
27+
```
28+
29+
### Step 3: Commit
30+
31+
Make sure git knows your name and email address:
32+
33+
```bash
34+
# In the project directory
35+
$ git config user.name "J. Random User"
36+
$ git config user.email "j.random.user@example.com"
37+
```
38+
39+
Writing good commit logs is important. A commit log should describe what
40+
changed and why. Follow these guidelines when writing one:
41+
42+
1. The first line should be a short description of the change
43+
(e.g. "get-metadata: check if the committer matches the author").
44+
2. Keep the second line blank.
45+
3. Wrap all lines at 72 columns.
46+
47+
The header line should be meaningful; it is what other people see when they
48+
run `git shortlog` or `git log --oneline`.
49+
50+
If your patch fixes an open issue, you can add a reference to it at the end
51+
of the log. Use the `Fixes:` prefix and the full issue URL. For example:
52+
53+
```
54+
Fixes: https://github.com/joyeecheung/node-core-utils/issues/1
55+
```
56+
57+
### Step 4: Rebase
58+
59+
Use `git rebase` (not `git merge`) to sync your work from time to time.
60+
61+
```bash
62+
$ git checkout my-feature-branch
63+
$ git fetch upstream
64+
$ git rebase upstream/master
65+
```
66+
67+
### Step 5: Test
68+
69+
Bug fixes and features should come with tests. Add your tests in the
70+
`test` directory. The general rule is, if the test does not need to send
71+
any requests to external servers, put it in `test/unit`. Otherwise put it
72+
in `test/intergration`. Test fixtures should be placed in `test/fixtures`.
73+
74+
```bash
75+
$ npm install
76+
# To run the unit tests
77+
$ npm test
78+
# To run all the tests
79+
$ npm run test-all
80+
```
81+
82+
Make sure the linter is happy and that all tests pass before submitting a
83+
pull request.
84+
85+
### Step 6: Push
86+
87+
```bash
88+
$ git push origin my-feature-branch
89+
# Or if you have pushed before and have rebased after that,
90+
# do git push --force origin my-feature-branch instead
91+
```
92+
93+
Go to https://github.com/yourusername/node-core-utils and
94+
select your feature branch. Click the 'Pull Request' button
95+
and fill out the form.
96+
97+
Pull requests are usually reviewed within a few days. If there are comments
98+
to address, apply your changes in a separate commit and push that to your
99+
feature branch. Post a comment in the pull request afterwards.
100+
101+
## Code of Conduct
102+
103+
We follow the
104+
[Node.js Code of Conduct](https://github.com/nodejs/TSC/blob/master/CODE_OF_CONDUCT.md)
105+
in this project.
106+
107+
## Developer's Certificate of Origin 1.1
108+
109+
By making a contribution to this project, I certify that:
110+
111+
* (a) The contribution was created in whole or in part by me and I
112+
have the right to submit it under the open source license
113+
indicated in the file; or
114+
115+
* (b) The contribution is based upon previous work that, to the best
116+
of my knowledge, is covered under an appropriate open source
117+
license and I have the right under that license to submit that
118+
work with modifications, whether created in whole or in part
119+
by me, under the same open source license (unless I am
120+
permitted to submit under a different license), as indicated
121+
in the file; or
122+
123+
* (c) The contribution was provided directly to me by some other
124+
person who certified (a), (b) or (c) and I have not modified
125+
it.
126+
127+
* (d) I understand and agree that this project and the contribution
128+
are public and that a record of the contribution (including all
129+
personal information I submit with it, including my sign-off) is
130+
maintained indefinitely and may be redistributed consistent with
131+
this project or the open source license(s) involved.

‎LICENSE

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2017 node-core-utils contributors
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

‎README.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![codecov](https://img.shields.io/codecov/c/github/joyeecheung/node-core-utils.svg?style=flat-square)](https://codecov.io/gh/joyeecheung/node-core-utils)
55
[![Known Vulnerabilities](https://snyk.io/test/github/joyeecheung/node-core-utils/badge.svg?style=flat-square)](https://snyk.io/test/github/joyeecheung/node-core-utils)
66

7-
CLI tools for Node.js Core collaborators
7+
CLI tools for Node.js Core collaborators.
88

99
## Usage
1010

@@ -74,7 +74,7 @@ $ get-metadata $PRID >> msg.txt
7474
$ git commit --amend -F msg.txt
7575
```
7676

77-
### TODO
77+
### Features
7878

7979
- [x] Generate `PR-URL`
8080
- [x] Generate `Reviewed-By`
@@ -86,3 +86,11 @@ $ git commit --amend -F msg.txt
8686
- [x] Check two TSC approval for semver-major
8787
- [ ] Warn new commits after reviews
8888
- [ ] Check number of files changed (request pre-backport)
89+
90+
### Contributing
91+
92+
See [CONTRIBUTIN.md](./CONTRIBUTING.md).
93+
94+
### License
95+
96+
MIT. See [LICENSE](./LICENSE).

0 commit comments

Comments
 (0)
Please sign in to comment.