Skip to content

Commit 10cc1b5

Browse files
committed
DOC: Clarify merge policy
1 parent b3ab4a3 commit 10cc1b5

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

doc/devel/pr_guide.rst

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,22 @@ a corresponding branch.
176176

177177
Merging
178178
-------
179+
As a guiding principle, we require two approvals from core developers before
180+
merging a pull request. This two-pairs-of-eyes strategy shall ensure a
181+
consistent project direction and prevent accidental mistakes. It's permissible
182+
to merge with one approval if the change is not fundamental and can easily be
183+
reverted any time in the future.
179184

180-
* Documentation and examples may be merged by the first reviewer. Use
185+
Some explicit rules following from this:
186+
187+
* *Documentation and examples* may be merged by the first reviewer. Use
181188
the threshold "is this better than it was?" as the review criteria.
182189

183-
* For code changes (anything in ``src`` or ``lib``) at least two
190+
* Minor *infrastructure updates*, e.g. temporary pinning of broken dependencies
191+
or small changes to the CI configuration, can be merged with a single
192+
approval.
193+
194+
* *Code changes* (anything in ``src`` or ``lib``) need at least two
184195
core developers (those with commit rights) should review all pull
185196
requests. If you are the first to review a PR and approve of the
186197
changes use the GitHub `'approve review'
@@ -205,9 +216,11 @@ Merging
205216
A core dev should only champion one PR at a time and we should try to keep
206217
the flow of championed PRs reasonable.
207218

208-
* Do not self merge, except for 'small' patches to un-break the CI or
209-
when another reviewer explicitly allows it (ex, "Approve modulo CI
210-
passing, may self merge when green").
219+
After giving the last required approval, the author of the approval should
220+
merge the PR. PR authors must not self-merge, except for when another reviewer
221+
explicitly allows it (e.g., "Approve modulo CI passing, may self merge when
222+
green", or "Take or leave the comments. You may self merge".).
223+
Core developers may also self-merge in exceptional emergency situations.
211224

212225
.. _pr-automated-tests:
213226

0 commit comments

Comments
 (0)