8000 Merge pull request #7148 from tacaswell/doc_review_guidelines · matplotlib/matplotlib@972e165 · GitHub
[go: up one dir, main page]

Skip to content

Commit 972e165

Browse files
authored
Merge pull request #7148 from tacaswell/doc_review_guidelines
Doc review guidelines
2 parents 3f2f117 + 4a51095 commit 972e165

File tree

2 files changed

+80
-2
lines changed

2 files changed

+80
-2
lines changed

doc/devel/coding_guide.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,67 @@ C/C++ extensions
165165

166166

167167

168+
PR Review guidelines
169+
====================
170+
171+
* If you have a commit bit, then you are trusted to use it. Please
172+
help review and merge PRs!
173+
174+
* Two developers (those with commit rights) should review all pull
175+
requests. If you are the first to review a PR please and approve of
176+
the changes please edit the title to include ``'[MRG+1]'`` and use
177+
the github `'approve review'
178+
<https://help.github.com/articles/reviewing-changes-in-pull-requests/>`__
179+
tool to mark it as such. If you are a subsequent reviewer and you
180+
approve either merge (and backport if needed) or increment the
181+
number in the title to ask for further review (and trigger the gh
182+
'approve review'). If you do the merge please removed the
183+
``'[MRG+N']`` prefix.
184+
185+
* Do not self merge, except for 'small' patches to un-break the CI.
186+
187+
* Squashing is case-by-case. The balance is between burden on the
188+
contributor, keeping a relatively clean history, and keeping a
189+
history usable for bisecting. The only time we are really strict
190+
about it is to eliminate binary files (ex multiple test image
191+
re-generations) and to remove upstream merges.
192+
193+
* Be patient with new contributors.
194+
195+
* Do not let perfect be the enemy of the good, particularly for
196+
documentation or example PRs. If you find yourself making many
197+
small suggestions, either open a PR against the original branch or
198+
merge the PR and then open a new PR against upstream.
199+
200+
201+
202+
Backports
203+
=========
204+
205+
206+
When doing backports please include the branch you backported the
207+
commit to along with the SHA in a comment on the original PR.
208+
209+
Assuming we have ``matplotlib`` as a read-only remote to the
210+
matplotlib/matplotlib repo and ``DANGER`` as a read/write remote to
211+
the matplotlib/matplotlib repo, we do a backport from master to 2.x.
212+
The ``TARGET_SHA`` is the hash of the merge commit you would like to
213+
backport. This can be read off of the github PR page (in the UI with
214+
the merge notification) or through the git CLI tools.::
215+
216+
git fetch matplotlib
217+
git checkout v2.x
218+
git merge --ff-only matplotlib/v2.x
219+
git cherry-pick -m 1 TARGET_SHA
220+
gitk # to look at it
221+
# local tests? (use your judgment)
222+
git push DANGER v2.x
223+
# leave a comment on PR noting sha of the resulting commit
224+
# from the cherry-pick + branch it was moved to
225+
226+
These commands work on git 2.7.1.
227+
228+
168229
Style guide
169230
===========
170231

doc/devel/gitwash/set_up_fork.rst

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,29 @@ that you make. It is not tracked in your personal repository on
6161
github_.
6262

6363
Just for your own satisfaction, show yourself that you now have a new
64-
'remote', with ``git remote -v show``, giving you something like::
64+
'remote', with ``git remote -v``, giving you something like::
6565

6666
upstream git://github.com/matplotlib/matplotlib.git (fetch)
6767
upstream git://github.com/matplotlib/matplotlib.git (push)
6868
origin git@github.com:your-user-name/matplotlib.git (fetch)
6969
origin git@github.com:your-user-name/matplotlib.git (push)
7070

71-
.. include:: links.inc
7271

72+
Read-only remote / push access to ``matplotlib/matplotlib``
73+
-----------------------------------------------------------
74+
75+
If you have commit rights to ``matplotlib/matplotlib`` the ``git://``
76+
protocol URL will still be read-only (due to it not supporting
77+
authentication and restrictions on github's side). To reduce the
78+
chance of accidentally pushing to upstream, we suggest setting up a
79+
read-only remote of upstream as above and a read/write remote as ::
80+
81+
git remote add DANGER git@github.com:matplotlib/matplotlib.git
82+
83+
or ::
84+
85+
git remote add HOLY_COMMIT_RIGHTS_BATMAN https://github.com/matplotlib/matplotlib.git
86+
87+
88+
89+
.. include:: links.inc

0 commit comments

Comments
 (0)
0