|
| 1 | +## Guidelines for Pull Requests and Releases (Web3 1.x) |
| 2 | + |
| 3 | +This document provides some ground rules for contributors (including the maintainer(s) of |
| 4 | +the project) about how to make, review and publish changes to 1.x. The most basic requirement is |
| 5 | +that **Web3 not break**. |
| 6 | + |
| 7 | +### Pull Requests for substantive changes (e.g. everything except comments and docs) |
| 8 | + |
| 9 | +1. Any PR that introduces a logic change should include tests. (In many cases, the tests will take |
| 10 | +more time to write than the actual code). |
| 11 | + |
| 12 | +2. All PRs should sit for 72 hours with the `pleasereview` tag in order to garner feedback. |
| 13 | + |
| 14 | +3. No PR should be merged until it has been reviewed, passes CI, and all reviews' comments are |
| 15 | +addressed. |
| 16 | + |
| 17 | +4. PRs should: |
| 18 | + + have a narrow, well-defined focus. |
| 19 | + + make the smallest set of changes possible to achieve their goal. |
| 20 | + + include a clear description in the opening comment. |
| 21 | + + preserve the conventions and stylistic consistency of any files they modify. |
| 22 | + |
| 23 | +5. Given the choice between a conservative change that mostly works and an adventurous change which |
| 24 | +seems better but introduces uncertainty - prefer the conservative change. |
| 25 | + |
| 26 | +### Reviews |
| 27 | + |
| 28 | +The end-goal of review is to suggest useful improvements to the author. Reviews should finish with |
| 29 | +approval unless there are issues that would result in: |
| 30 | + |
| 31 | +1. Buggy behaviour. |
| 32 | + |
| 33 | +2. Undue maintenance burden. |
| 34 | + |
| 35 | +3. Pessimisation (i.e. speed reduction / meaningful build-size increases). |
| 36 | + |
| 37 | +4. Feature reduction (i.e. it removes some aspect of functionality that users rely on). |
| 38 | + |
| 39 | +5. Avoidable risk (i.e it's difficult to test or hard to anticipate the implications of, without |
| 40 | +being strictly necessary to fix something broken). |
| 41 | + |
| 42 | +### Releases |
| 43 | + |
| 44 | +1. All releases should be proposed in a PR and subject to community review for a minimum of one week. |
| 45 | + |
| 46 | +2. Release review periods should be accompanied by a published `rc` version which can be used for |
| 47 | +sanity checks / additional testing. |
| 48 | + |
| 49 | +3. During release review, the code is frozen unless new changes are proposed, approved and merged. |
| 50 | +Changes should trigger a new `rc` release and set the release clock back enough that reviewers have |
| 51 | +the time they need to test new changes. |
| 52 | + |
| 53 | +4. Regular maintainers should manually test the `rc` against a Node project and the published |
| 54 | +minified bundle in a browser context. An external reviewer should verify they've done the same. |
| 55 | + |
| 56 | +5. A release PR must be approved at least by two known contributors of the web3.js project |
| 57 | + |
| 58 | +### Emergencies |
| 59 | + |
| 60 | +This topic is under org-wide discussion at https://github.com/ethereum/js-organization/issues/6 |
| 61 | + |
| 62 | +(Much of the above is borrowed from Openish, Parity and Ethers contributions docs. It's meant |
| 63 | +to establish clear, egalitarian criteria for making changes to the code while prioritizing the |
| 64 | +safety of Web3's users.) |
0 commit comments