Skip to content

Commit cbb3ecb

Browse files
committed
doc: clarified & split up contribution docs
- clarified the role of "collaborators" - split out a governance doc - split out a collaborator guide - cleaned up the contributing doc - cleaned up the readme & added collaborators list
1 parent 53ba494 commit cbb3ecb

File tree

4 files changed

+510
-426
lines changed

4 files changed

+510
-426
lines changed

COLLABORATOR_GUIDE.md

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# io.js Collaborator Guide
2+
3+
This document contains information for Collaborators of the io.js
4+
project regarding maintaining the code, documentation and issues.
5+
6+
Collaborators should be familiar with the guidelines for new
7+
contributors in [CONTRIBUTING.md](./CONTRIBUTING.md) and also
8+
understand the project governance model as outlined in
9+
[GOVERNANCE.md](./GOVERNANCE.md).
10+
11+
## Issues and Pull Requests
12+
13+
Courtesy should always be shown to individuals submitting issues and
14+
pull requests to the io.js project.
15+
16+
Collaborators should feel free to take full responsibility for
17+
managing issues and pull requests they feel qualified to handle, as
18+
long as this is done while being mindful of these guidelines, the
19+
opinions of other Collaborators and guidance of the TC.
20+
21+
Collaborators may **close** any issue or pull request they believe is
22+
not relevant for the future of the io.js project. Where this is
23+
unclear, the issue should be left open for several days to allow for
24+
additional discussion. Where this does not yield input from io.js
25+
Collaborators or additional evidence that the issue has relevance, the
26+
issue may be closed. Remember that issues can always be re-opened if
27+
necessary.
28+
29+
## Accepting Modifications
30+
31+
All modifications to the the io.js code and documentation should be
32+
performed via GitHub pull requests, including modifications by
33+
Collaborators and TC members.
34+
35+
All pull requests must be reviewed and accepted by a Collaborator with
36+
sufficient expertise who is able to take full responsibility for the
37+
change. In the case of pull requests proposed by an existing
38+
Collaborator, an additional Collaborator is required for sign-off.
39+
40+
In some cases, it may be necessary to summon a qualified Collaborator
41+
to a pull request for review by @-mention.
42+
43+
If you are unsure about the modification and are not prepared to take
44+
full responsibility for the change, defer to another Collaborator.
45+
46+
Before landing pull requests, sufficient time should be left for input
47+
from other Collaborators. Leave at least 48 hours during the week and
48+
72 hours over weekends to account for international time differences
49+
and work schedules. Trivial changes (e.g. those which fix minor bugs
50+
or improve performance without affecting API or causing other
51+
wide-reaching impact) may be landed after a shorter delay.
52+
53+
Where there is no disagreement amongst Collaborators, a pull request
54+
may be landed given appropriate review. Where there is discussion
55+
amongst Collaborators, consensus should be sought if possible. The
56+
lack of consensus may indicate the need to elevate discussion to the
57+
TC for resolution (see below).
58+
59+
All bugfixes require a test case which demonstrates the defect. The
60+
test should *fail* before the change, and *pass* after the change.
61+
62+
### Involving the TC
63+
64+
Collaborators may opt to elevate pull requests or issues to the TC for
65+
discussion by assigning the ***tc-agenda*** tag. This should be done
66+
where a pull request:
67+
68+
- has a significant impact on the codebase,
69+
- is inherently controversial; or
70+
- has failed to reach consensus amongst the Collaborators who are
71+
actively participating in the discussion.
72+
73+
The TC should serve as the final arbiter where required.
74+
75+
## Landing Pull Requests
76+
77+
Always modify the original commit message to include additional meta
78+
information regarding the change process:
79+
80+
- A `Reviewed-By: Name <email>` line for yourself and any
81+
other Collaborators who have reviewed the change.
82+
- A `PR-URL:` line that references the full GitHub URL of the original
83+
pull request being merged so it's easy to trace a commit back to the
84+
conversation that lead up to that change.
85+
- A `Fixes: X` line, where _X_ is either includes the full GitHub URL
86+
for an issue, and/or the hash and commit message if the commit fixes
87+
a bug in a previous commit.
88+
89+
Additionally:
90+
91+
- Double check PR's to make sure the person's _full name_ and email
92+
address are correct before merging.
93+
- Except when updating dependencies, all commits should be self
94+
contained. Meaning, every commit should pass all tests. This makes
95+
it much easier when bisecting to find a breaking change.
96+
97+
### Technical HOWTO
98+
99+
_Optional:_ ensure that you are not in a borked `am`/`rebase` state
100+
101+
```text
102+
$ git am --abort
103+
$ git rebase --abort
104+
```
105+
106+
Checkout proper target branch
107+
108+
```text
109+
$ git checkout v1.x
110+
```
111+
112+
Update the tree
113+
114+
```text
115+
$ git fetch origin
116+
$ git merge --ff-only origin/v1.x
117+
```
118+
119+
Apply external patches
120+
121+
```text
122+
$ curl https://github.com/iojs/io.js/pull/xxx.patch | git am --whitespace=fix
123+
```
124+
125+
Check and re-review the changes
126+
127+
```text
128+
$ git diff origin/v1.x
129+
```
130+
131+
Check number of commits and commit messages
132+
133+
```text
134+
$ git log origin/v1.x...v1.x
135+
```
136+
137+
If there are multiple commits that relate to the same feature or
138+
one with a feature and separate with a test for that feature -
139+
you'll need to squash them (or strictly speaking `fixup`).
140+
141+
```text
142+
$ git rebase -i origin/v1.x
143+
```
144+
145+
This will open a screen like this (in the default shell editor):
146+
147+
```text
148+
pick 6928fc1 crypto: add feature A
149+
pick 8120c4c add test for feature A
150+
pick 51759dc feature B
151+
pick 7d6f433 test for feature B
152+
153+
# Rebase f9456a2..7d6f433 onto f9456a2
154+
#
155+
# Commands:
156+
# p, pick = use commit
157+
# r, reword = use commit, but edit the commit message
158+
# e, edit = use commit, but stop for amending
159+
# s, squash = use commit, but meld into previous commit
160+
# f, fixup = like "squash", but discard this commit's log message
161+
# x, exec = run command (the rest of the line) using shell
162+
#
163+
# These lines can be re-ordered; they are executed from top to bottom.
164+
#
165+
# If you remove a line here THAT COMMIT WILL BE LOST.
166+
#
167+
# However, if you remove everything, the rebase will be aborted.
168+
#
169+
# Note that empty commits are commented out
170+
```
171+
172+
Replace a couple of `pick`s with `fixup` to squash them into a
173+
previous commit:
174+
175+
```text
176+
pick 6928fc1 crypto: add feature A
177+
fixup 8120c4c add test for feature A
178+
pick 51759dc feature B
179+
fixup 7d6f433 test for feature B
180+
```
181+
182+
Replace `pick` with `reword` to change the commit message:
183+
184+
```text
185+
reword 6928fc1 crypto: add feature A
186+
fixup 8120c4c add test for feature A
187+
reword 51759dc feature B
188+
fixup 7d6f433 test for feature B
189+
```
190+
191+
Save the file and close the editor, you'll be asked to enter new
192+
commit message for that commit, and everything else should go
193+
smoothly. Note that this is a good moment to fix incorrect commit
194+
logs, ensure that they are properly formatted, and add `Reviewed-By`
195+
line.
196+
197+
Time to push it:
198+
199+
```text
200+
$ git push origin v1.x
201+
```

0 commit comments

Comments
 (0)