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 ## Caine's Requirements
176 I am pleased to see your valuable contribution to this project. Would you
177 please mind answering a couple of questions to help me classify this submission
178 and/or gather required information for the core team members?
182 * _Issue-only_ Does this issue happen in core, or in some user-space
183 module from npm or other source? Please ensure that the test case
184 that reproduces this problem is not using any external dependencies.
185 If the error is not reproducible with just core modules - it is most
186 likely not a io.js problem. _Expected: `yes`_
187 * Which part of core do you think it might be related to?
188 _One of: `debugger, http, assert, buffer, child_process, cluster, crypto,
189 dgram, dns, domain, events, fs, http, https, module, net, os, path,
190 querystring, readline, repl, smalloc, stream, timers, tls, url, util, vm,
191 zlib, c++, docs, other`_ (_label_)
192 * Which versions of io.js do you think are affected by this?
193 _One of: `v0.10, v0.12, v1.0.0`_ (_label_)
194 * _PR-only_ Does `make test` pass after applying this Pull Request.
196 * _PR-only_ Is the commit message properly formatted? (See
197 CONTRIBUTING.md for more information)
200 Please provide the answers in an ordered list like this:
202 1. Answer for the first question
203 2. Answer for the second question
206 Note that I am just a bot with a limited human-reply parsing abilities,
207 so please be very careful with numbers and don't skip the questions!
209 _In case of success I will say:_ `...summoning the core team devs!`.
211 _In case of validation problem I will say:_ `Sorry, but something is not right
219 * indutny: crypto, tls, https, child_process, c++
220 * trevnorris: buffer, http, https, smalloc
221 * bnoordhuis: http, cluster, child_process, dgram