1 # Contributing to io.js
5 When opening new issues or commenting on existing issues on this repository
6 please make sure discussions are related to concrete technical issues with the
9 Discussion of non-technical topics including subjects like intellectual
10 property, trademark and high level project questions should move to the
11 [node-forward discussions repository](https://github.com/node-forward/discussions)
16 The io.js project has an open governance model and welcomes new contributors.
17 Individuals making significant and valuable contributions are made
18 _Collaborators_ and given commit-access to the project. See the
19 [GOVERNANCE.md](./GOVERNANCE.md) document for more information about how this
22 This document will guide you through the contribution process.
26 Fork the project [on GitHub](https://github.com/iojs/io.js) and check out your
30 $ git clone git@github.com:username/io.js.git
32 $ git remote add upstream git://github.com/iojs/io.js.git
37 Now decide if you want your feature or bug fix to go into the master branch
38 or the stable branch. As a rule of thumb, bug fixes go into the stable branch
39 while new features go into the master branch.
41 The stable branch is effectively frozen; patches that change the io.js
42 API/ABI or affect the run-time behavior of applications get rejected. The
43 current stable branch is set as the default branch on GitHub.
45 #### Respect the stability index
47 The rules for the master branch are less strict; consult the
48 [stability index](./doc/api/documentation.markdown#stability-index) for details.
50 In a nutshell, modules are at varying levels of API stability. Bug fixes are
51 always welcome but API or behavioral changes to modules at stability level 3
52 and up are off-limits.
56 io.js has several bundled dependencies in the *deps/* and the *tools/*
57 directories that are not part of the project proper. Any changes to files
58 in those directories or its subdirectories should be sent to their respective
59 projects. Do not send your patch to us, we cannot accept it.
61 In case of doubt, open an issue in the
62 [issue tracker](https://github.com/iojs/io.js/issues/) or contact one of the
63 [project Collaborators](https://github.com/iojs/io.js/#Current-Project-Team-Members)
64 ([IRC](http://webchat.freenode.net/?channels=io.js) is often the best medium.)Especially do so if you plan to work on something big. Nothing is more
65 frustrating than seeing your hard work go to waste because your vision
66 does not align with the project team.
71 Create a feature branch and start hacking:
74 $ git checkout -b my-feature-branch -t origin/v1.x
77 (Where `v1.x` is the latest stable branch as of this writing.)
82 Make sure git knows your name and email address:
85 $ git config --global user.name "J. Random User"
86 $ git config --global user.email "j.random.user@example.com"
89 Writing good commit logs is important. A commit log should describe what
90 changed and why. Follow these guidelines when writing one:
92 1. The first line should be 50 characters or less and contain a short
93 description of the change prefixed with the name of the changed
94 subsystem (e.g. "net: add localAddress and localPort to Socket").
95 2. Keep the second line blank.
96 3. Wrap all other lines at 72 columns.
98 A good commit log can look something like this:
101 subsystem: explaining the commit in one line
103 Body of commit message is a few lines of text, explaining things
104 in more detail, possibly giving some background about the issue
105 being fixed, etc. etc.
107 The body of the commit message can be several paragraphs, and
108 please do proper word-wrap and keep columns shorter than about
109 72 characters or so. That way `git log` will show things
110 nicely even when it is indented.
113 The header line should be meaningful; it is what other people see when they
114 run `git shortlog` or `git log --oneline`.
116 Check the output of `git log --oneline files_that_you_changed` to find out
117 what subsystem (or subsystems) your changes touch.
122 Use `git rebase` (not `git merge`) to sync your work from time to time.
126 $ git rebase upstream/v1.x # or upstream/master
132 Bug fixes and features **should come with tests**. Add your tests in the
133 test/simple/ directory. Look at other tests to see how they should be
134 structured (license boilerplate, common includes, etc.).
140 Make sure the linter is happy and that all tests pass. Please, do not submit
141 patches that fail either check.
143 If you are updating tests and just want to run a single test to check it, you
144 can use this syntax to run it exactly as the test harness would:
147 $ python tools/test.py -v --mode=release simple/test-stream2-transform
150 You can run tests directly with node:
153 $ node ./test/simple/test-streams2-transform.js
160 $ git push origin my-feature-branch
163 Go to https://github.com/yourusername/io.js and select your feature branch.
164 Click the 'Pull Request' button and fill out the form.
166 Pull requests are usually reviewed within a few days. If there are comments
167 to address, apply your changes in a separate commit and push that to your
168 feature branch. Post a comment in the pull request afterwards; GitHub does
169 not send out notifications when you add commits.
172 ## Developer's Certificate of Origin 1.0
174 By making a contribution to this project, I certify that:
176 * (a) The contribution was created in whole or in part by me and I
177 have the right to submit it under the open source license indicated
179 * (b) The contribution is based upon previous work that, to the best
180 of my knowledge, is covered under an appropriate open source license
181 and I have the right under that license to submit that work with
182 modifications, whether created in whole or in part by me, under the
183 same open source license (unless I am permitted to submit under a
184 different license), as indicated in the file; or
185 * (c) The contribution was provided directly to me by some other
186 person who certified (a), (b) or (c) and I have not modified it.
191 This Code of Conduct is adapted from [Rust's wonderful
192 CoC](https://github.com/rust-lang/rust/wiki/Note-development-policy#conduct).
194 * We are committed to providing a friendly, safe and welcoming
195 environment for all, regardless of gender, sexual orientation,
196 disability, ethnicity, religion, or similar personal characteristic.
197 * Please avoid using overtly sexual nicknames or other nicknames that
198 might detract from a friendly, safe and welcoming environment for
200 * Please be kind and courteous. There's no need to be mean or rude.
201 * Respect that people have differences of opinion and that every
202 design or implementation choice carries a trade-off and numerous
203 costs. There is seldom a right answer.
204 * Please keep unstructured critique to a minimum. If you have solid
205 ideas you want to experiment with, make a fork and see how it works.
206 * We will exclude you from interaction if you insult, demean or harass
207 anyone. That is not welcome behaviour. We interpret the term
208 "harassment" as including the definition in the [Citizen Code of
209 Conduct](http://citizencodeofconduct.org/); if you have any lack of
210 clarity about what might be included in that concept, please read
211 their definition. In particular, we don't tolerate behavior that
212 excludes people in socially marginalized groups.
213 * Private harassment is also unacceptable. No matter who you are, if
214 you feel you have been or are being harassed or made uncomfortable
215 by a community member, please contact one of the channel ops or any
216 of the TC members immediately with a capture (log, photo, email) of
217 the harassment if possible. Whether you're a regular contributor or
218 a newcomer, we care about making this community a safe place for you
219 and we've got your back.
220 * Likewise any spamming, trolling, flaming, baiting or other
221 attention-stealing behaviour is not welcome.
222 * Avoid the use of personal pronouns in code comments or
223 documentation. There is no need to address persons when explaining
224 code (e.g. "When the developer")
227 ## Caine's Requirements
231 I am pleased to see your valuable contribution to this project. Would you
232 please mind answering a couple of questions to help me classify this submission
233 and/or gather required information for the core team members?
237 * _Issue-only_ Does this issue happen in core, or in some user-space
238 module from npm or other source? Please ensure that the test case
239 that reproduces this problem is not using any external dependencies.
240 If the error is not reproducible with just core modules - it is most
241 likely not a io.js problem. _Expected: `yes`_
242 * Which part of core do you think it might be related to?
243 _One of: `debugger, http, assert, buffer, child_process, cluster, crypto,
244 dgram, dns, domain, events, fs, http, https, module, net, os, path,
245 querystring, readline, repl, smalloc, stream, timers, tls, url, util, vm,
246 zlib, c++, docs, other`_ (_label_)
247 * Which versions of io.js do you think are affected by this?
248 _One of: `v0.10, v0.12, v1.0.0`_ (_label_)
249 * _PR-only_ Does `make test` pass after applying this Pull Request.
251 * _PR-only_ Is the commit message properly formatted? (See
252 CONTRIBUTING.md for more information)
255 Please provide the answers in an ordered list like this:
257 1. Answer for the first question
258 2. Answer for the second question
261 Note that I am just a bot with a limited human-reply parsing abilities,
262 so please be very careful with numbers and don't skip the questions!
264 _In case of success I will say:_ `...summoning the core team devs!`.
266 _In case of validation problem I will say:_ `Sorry, but something is not right
274 * indutny: crypto, tls, https, child_process, c++
275 * trevnorris: buffer, http, https, smalloc
276 * bnoordhuis: http, cluster, child_process, dgram