Skip to content

Commit 096e16a

Browse files
committed
add 1st draft of maintainer guide
1 parent dcce850 commit 096e16a

File tree

1 file changed

+282
-0
lines changed

1 file changed

+282
-0
lines changed

MAINTAINERS.md

+282
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,282 @@
1+
# Mocha Maintainer's Handbook
2+
3+
Hi stranger! We've written this document for:
4+
5+
1. Active maintainers of Mocha
6+
2. Prospective maintainers of Mocha
7+
3. Anyone curious about how Mocha's maintainers maintain Mocha
8+
9+
The purpose of this document is to *describe our processes*. We want to avoid conflicts and confusion around "unwritten rules". In our opinion, the most straightforward way to address this is to *write them down*. This *also* happens to be the most straightforward way to change them!
10+
11+
To assist in eliminating ambiguity, we will define some terms.
12+
13+
## Terminology
14+
15+
Anyone involved with Mocha will fall into one of these buckets: **user**, **contributor**, and **maintainer**.
16+
17+
### User
18+
19+
A "user" for the purpose of this document is any *individual developer* who consumes Mocha to write and/or execute tests. A user interacts with contributors. A user interacts with the software, web site, documentation, etc., which these contributors provide.
20+
21+
As a user, you're expected to follow the [code of conduct](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) when interacting in Mocha's "official" social spaces. This includes:
22+
23+
- Any chatroom under the `mochajs` organization on Gitter
24+
- Any project under the `mochajs` organization on GitHub
25+
- The MochaJS Google Group
26+
- Any future social, in-person or online events which Mocha might organize
27+
28+
### Contributor
29+
30+
This is the most important thing:
31+
32+
**You don't have to write code to be a contributor!**
33+
34+
A "contributor" is any individual who has *given back* in some way to the project and its community. Contributions include (but are not limited to):
35+
36+
1. Reporting bugs which follow the reporting guidelines
37+
2. Suggesting and debating enhancements that have wide applicability
38+
3. Helping others with Mocha-related questions on [Gitter](https://gitter.im/mochajs/mocha), [StackOverflow](https://stackoverflow.com), Google groups, or other sites
39+
4. Sending pull requests which fix bugs, improve documentation, improve developer experience, improve code quality, and/or implement requested enhancements
40+
5. Reviewing code on pull requests
41+
6. Providing design assets
42+
7. Posting a tutorial on a personal blog or blogging site
43+
8. Suggesting usages for project funds
44+
9. Organizing a "Mocha-branded" event or workshop
45+
10. Recruiting more contributors! Don't spam.
46+
11. Researching the user base, getting feedback, etc. Don't spam.
47+
48+
A contributor is *usually* a user as well, but this isn't a hard-and-fast rule. A contributor is also expected to adhere to the [code of conduct](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) as a user would.
49+
50+
As you can see, it's wide open! Think of it another way: if you are *adding value to Mocha*, then you are a contributor.
51+
52+
> Due to the nature of GitHub, it's a challenge to recognize those who've made contributions *elsewhere* on the web, or even contributions of the "non-code" variety. If you know of any great contributions which have gone unnoticed, please bring them to the maintainers' attention!
53+
54+
#### A Note About Donations
55+
56+
A [donation](https://opencollective.com/mochajs) is also a great way to help Mocha if you want to help sustain OSS, but can't find time to contribute in other ways, or just want to say "thanks!"
57+
58+
We love our backers and sponsors! 💕
59+
60+
### Maintainer
61+
62+
A maintainer has certain "rights" (or "permissions") to the Mocha project and other projects under the `mochajs` organization. There's no way to dance around this: with these rights come increased responsibilities.
63+
64+
However, **there is no expectation of a standard of technical ability** to be a maintainer of Mocha. This doesn't imply a lack of technical oversight--every pull request will eventually be reviewed.
65+
66+
**If you think you aren't experienced enough to maintain a project like Mocha, you are incorrect.** The only requirements are the above responsibilities and a desire to help the project. It bears repeating:
67+
68+
**You don't have to write code to be a maintainer!**
69+
70+
> Maintainer is synonymous with "Collaborator" and/or "Owner" in GitHub parlance.
71+
72+
#### The Responsibilities of a Maintainer
73+
74+
As a maintainer, you are expected to *not just* "follow" the code of conduct, but embody its values. Your public behavior, whether in the physical or virtual world, reflects upon the project and other maintainers.
75+
76+
> If you don't understand the code of conduct, or why it exists, it is *your responsibility* to educate yourself.
77+
> This does not imply the CoC is immutable.
78+
79+
Furthermore, a maintainer is a contributor who **contributes regularly**, or expresses a *desire to do so.* That could be every day--but it might be once a week, or even once a month. Your boss doesn't work here; contribute as often as you wish. We are all people with Real Lives, and for many of us, contributing to OSS is just a hobby!
80+
81+
Finally, a maintainer must help define what makes Mocha "Mocha". At minimum, a maintainer must *understand* the current definition (if a maintainer is not interested in decision-making). Some of these questions include:
82+
- What's the scope of Mocha?
83+
- Where should we focus efforts?
84+
- What's urgent, what can wait?
85+
- What can we break? What's off-limits?
86+
- What user feedback is valuable? What isn't?
87+
88+
As maintainers, *we work together* to learn about the nature of these questions. If we try hard enough, we even come to some answers!
89+
90+
A maintainer *must* also have 2FA enabled on their GitHub account.
91+
92+
#### The Rights of a Maintainer
93+
94+
You may choose to do zero or more of these *at their discretion*:
95+
96+
- Merge pull requests
97+
- Modify issues (closing, adding labels, assigning them other maintainers, etc.)
98+
- Modify GitHub [Projects](https://github.com/mochajs/mocha/projects)
99+
- Cancel builds, restart jobs, or otherwise interact with our CI server(s)
100+
- CRUD operations on GitHub integrations
101+
- Participate in the decision-making process
102+
- Add new maintainers to the team
103+
- Tag releases and publish Mocha to npm
104+
105+
> While maintainers have the ability to commit directly to the `master` branch, *this is to be avoided* if any other maintainer could reasonably take issue with the change, or the change affects Mocha's API or output. For example, a spelling correction in `CHANGELOG.md` may not require a pull request. A change to a reporter's output most certainly would! Maintainers are trusted to use their best judgement; if unsure, err on the side of caution.
106+
107+
#### About "Owners"
108+
109+
Some maintainers will have full admin rights to the [mochajs org](https://github.com/mochajs) and/or will have access to publish to npm.
110+
111+
- Those with publish access are expected to use npm's 2FA.
112+
- This level of access will be granted by the current owners to those maintainers who have earned the project's trust.
113+
114+
## Mocha's Decision-Making Process
115+
Mocha follows a [consensus-seeking decision-making](https://en.wikipedia.org/wiki/Consensus-seeking_decision-making) process. In other words, all maintainers attempt to come to agreement. If that fails, we decide by a simple vote.
116+
117+
Active maintainers will make an effort to solicit feedback from others before making important or potentially controversial decisions. Given the varying geographical distribution and availability of the maintenance team, we resolve to do the best we can to solicit feedback.
118+
119+
In other words, to have your opinion heard, participate regularly. The rest of the team won't wait on feedback that isn't necessarily forthcoming!
120+
121+
## Communication
122+
123+
Maintainers will mainly gather in [the mochajs/contributors channel](https://gitter.im/mochajs/contributors). This is a *public* channel, and *anyone* can join.
124+
Videoconference (or audio) calls may happen on a regular or irregular basis, as schedules allow. This is mainly because we have Real Lives and time zones suck.
125+
126+
## Labeling Issues & Pull Requests
127+
128+
All new issues will need to be triaged, and pull requests must be examined. Maintainers must understand [Semantic Versioning](http://semver.org) ("SemVer"), as Mocha follows it strictly.
129+
130+
> If you see an issue or PR that could use some labels, please add them!
131+
132+
The following list is incomplete, but it's better than nothing:
133+
134+
### Semantic Versioning
135+
136+
*All* issues should have one of these three labels:
137+
138+
- `semver-patch` for bug fixes, documentation, development environment changes, CI and tests
139+
- `semver-minor` for enhancements ("features")
140+
- `semver-major` for backwards-incompatible ("breaking") changes to the *output*, *API*, or environment support
141+
142+
Pull requests don't need `semver-*` labels, *unless* there is no associated issue.
143+
144+
An issue or PR which will introduce a breaking change will be `semver-major`, *regardless* of any other label.
145+
146+
### Questions
147+
148+
Support questions should be answered if possible, but the user should be directed to the chat room, StackOverflow, or Google Groups for further help, *if* it is indeed a Mocha-related issue.
149+
150+
If it's *not* a Mocha problem (people tend not to believe this), you may want to show a counter-example. It's often helpful to direct the issue author to the responsible project, if you can determine what that is.
151+
152+
- `common-mistake`: Issues which are *repeatedly* asked support questions or misunderstandings. This may also apply to questions which receive a lot of 👍's
153+
- `question`: Add this label if it's just a support question
154+
155+
### Bugs
156+
157+
- `unconfirmed`: A maintainer has not yet or cannot reproduce; typically `needs-feedback` follows (see "Feedback & Follow-ups" below)
158+
- `bug`: A confirmed bug
159+
160+
### Subsystems, Environments, Etc.
161+
162+
- `reporter`: Usually concerning Mocha's output
163+
- `browser`: Issues unique to a browser environment
164+
- `documentation`: Issues around incorrect or missing docs
165+
- `qa`: Issues around Mocha's own test suite
166+
- `chore`: Refactors, CI tweaks, dependencies, etc.
167+
- `developer experience`: Issues which will make it easier to contribute and maintain Mocha
168+
169+
### Feedback & Follow-ups
170+
171+
Issues or PRs which require action or feedback from a *specific* maintainer, should have that item *assigned* to them.
172+
173+
- `needs-feedback`: Issues which *need feedback from the original author*. Will automatically become `stale` (see "Meta" section below)
174+
- `needs-review`: For *pull requests only*; PRs which need a maintainer to inspect and/or merge them
175+
176+
### Meta
177+
178+
- `stale`: The "stalebot" marks things as stale and will close issues if they need feedback but haven't received any. Comment on an issue to prevent this from happening.
179+
- `duplicate`: Any issue which is a duplicate of some other issue. Label `duplicate`, link to original issue in comment, and close.
180+
181+
## Milestones
182+
183+
A major release following SemVer is "just a number". Yet, given the vast amount of projects which consume Mocha, we should avoid *frequent* breaking changes, as this becomes disruptive.
184+
In the manner of "ripping off a band-aid", sometimes we will want to group features or breaking changes together.
185+
If so, we can add those issues and/or PRs to a new GitHub "milestone", to keep track of what needs to go in before we release.
186+
Typically milestones have not been useful for anything other than grouping breaking changes together.
187+
188+
## Commenting on Issues and Reviewing Pull Requests
189+
190+
**All maintainers should be courteous and kind.** Thank the external contributor for the pull request, even if it is not merged. If the pull request has been opened (and subsequently closed) without discussion in a corresponding issue, let them know that by creating an issue first, they could have saved wasted effort. *Clearly and objectively* explain the reasoning for rejecting any PR.
191+
192+
If you need more information in an issue, nicely ask the user to provide it. Remind them to use the issue/PR templates if they have not. If the user never gets around to it, the "stalebot" will close it eventually anyhow.
193+
194+
### Reviewing Code
195+
196+
Use GitHub's code review features. Requesting a review from another maintainer *may or may not* actually result in a review; don't wait on it. If the PR cannot move forward without input from a certain maintainer, *assign them to the PR*.
197+
198+
### The Part About Jerks
199+
200+
There will be jerks.
201+
202+
#### Rude or Entitled People
203+
204+
These are users who feel the Mocha project and its maintainers *owe them* time or support. This is incorrect.
205+
206+
However, this behavior is often indicative of someone who is "new" to open source. Many just don't know better. It is not your *responsibility* to educate them (again, you owe them nothing).
207+
208+
Here are some suggestions:
209+
210+
1. If u mad, wait 20 minutes before writing a comment.
211+
2. "Kill them with kindness". Explain how they are presenting themselves; maybe link to a good article or two about it.
212+
3. Don't make it about "users vs. maintainers". Treat them like a potential future maintainer.
213+
4. Avoid adding to the drama. You could try to reach out privately; email may be in their GitHub profile. You will likely never hear from that individual again (problem solved)
214+
5. If an issue is getting out of control, lock it.
215+
6. If someone is *repeatedly* rude and does not correct their mistakes, you may ban them from participating in the `mochajs` org. If you do not have permission to do so, contact one which does (an "owner").
216+
217+
#### Code of Conduct Violations
218+
219+
**This section is theoretical, as it's yet to happen**.
220+
221+
1. Inform the individual of the violation; link to the CoC
222+
2. Follow up with JS Foundation for further guidance
223+
3. Repeated violators will be banned inasmuch as that is technically possible
224+
4. No maintainer nor contributor is exempt from the CoC
225+
226+
## Branches
227+
228+
`master` is the only maintained branch in `mochajs/mocha` or any of the other repos.
229+
Maintainers may push new branches to a repo, as long as they remove them when finished (merging a PR will prompt to do so).
230+
231+
## Merging PRs
232+
233+
GitHub has several options for how to merge a PR. Here's what we do:
234+
235+
1. *If a PR has multiple commits*, "Squash".
236+
2. *If a PR has a single commit*, "Rebase".
237+
3. Don't "Merge".
238+
239+
### Merging `semver-major` PRs
240+
241+
Once a `semver-major` PR has landed, this means the next release will be a major release. This is because we only maintain a single branch, `master`. So, this opens the floodgates to cram more breaking changes in. See the section about "milestones".
242+
243+
This is not necessarily ideal, and we should consider another method of using branches *if* it has little potential for confusion!
244+
245+
## Mocha's Release Process
246+
247+
*It's easier to release often.*
248+
249+
1. Decide whether this is a `patch`, `minor`, or `major` release by the PRs which have been merged since the last release.
250+
2. Checkout `master` in your working copy & pull.
251+
3. Modify `CHANGELOG.md`; follow the existing conventions in that file. Commit this file only; add `[ci skip]` to the commit message to avoid a build.
252+
4. Use `npm version` to bump the version; see `npm version --help` for more info. (Hint--use `-m`: e.g. `npm version patch -m 'Release v%s'`)
253+
5. Push `master` to origin with your new tag; e.g. `git push origin master --tags`
254+
6. Copy & paste the added lines to a new GitHub "release". Be sure to add any missing link references (use "preview" button). Save release as draft.
255+
7. Meanwhile, you can check [the build](https://travis-ci.org/mochajs/mocha) on Travis-CI.
256+
8. Once it's green and you're satisfied with the release notes, open your draft release on GitHub, then click "publish"
257+
9. Back in your working copy, run `npm publish`.
258+
10. Announce the update on Twitter or just tell your dog or something.
259+
260+
*Note: there are too many steps above.*
261+
262+
> As of this writing, `npm version` (using npm@5) is not working well, and you may have to tag manually. Commit the change to the version in `package.json` with a message of the format `Release vX.Y.Z`, then tag the changeset using `vX.Y.Z`.
263+
264+
## Projects
265+
266+
There are [Projects](https://github.com/mochajs/mocha/projects), but we haven't yet settled on how to use them.
267+
268+
## About The JS Foundation
269+
270+
The [JS Foundation](https://js.foundation) retains copyright of all projects underneath the [mochajs org](https://github.com/mochajs). The Foundation does not influence technical decisions nor the project roadmap. It is, however, charged with ensuring the continued vitality and sustainability of projects under its banner.
271+
272+
As a maintainer, you have access to the resources the JS Foundation provides.
273+
274+
## About OpenCollective
275+
276+
Mocha collects donations [via OpenCollective](https://opencollective.com/mochajs). As a maintainer, you may help decide how the funds are used. These decisions are made via a consensus-seeking process, much like any other decision.
277+
278+
Expense transparency is built in to OpenCollective.
279+
280+
* * *
281+
282+
Questions? Ask in the [contributors' chat room](https://gitter.im/mochajs/contributors)!

0 commit comments

Comments
 (0)