diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc59ecbd6df69..12b3eb4c10a4b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -70,9 +70,19 @@ following rules before you submit a pull request: [Utilities for Developers](http://scikit-learn.org/dev/developers/utilities.html#developers-utils) page. -- If your pull request addresses an issue, please use the pull request title - to describe the issue and mention the issue number in the pull request description. This will make sure a link back to the original issue is - created. +- Give your pull request a helpful title that summarises what your + contribution does. In some cases `Fix ` is enough. + `Fix #` is not enough. + +- Often pull requests resolve one or more other issues (or pull requests). + If merging your pull request means that some other issues/PRs should + be closed, you should + [use keywords to create link to them](https://github.com/blog/1506-closing-issues-via-pull-requests/) + (e.g., `Fixes #1234`; multiple issues/PRs are allowed as long as each one + is preceded by a keyword). Upon merging, those issues/PRs will + automatically be closed by GitHub. If your pull request is simply related + to some other issues/PRs, create a link to them without using the keywords + (e.g., `See also #1234`). - All public methods should have informative docstrings with sample usage presented as doctests when appropriate. diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 3321b703320bc..9db6ade08b691 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -1,9 +1,15 @@ + +#### Reference Issues/PRs + -#### Reference Issue - #### What does this implement/fix? Explain your changes. diff --git a/doc/developers/contributing.rst b/doc/developers/contributing.rst index d1d12c5a5caa3..fbed0743d8b84 100644 --- a/doc/developers/contributing.rst +++ b/doc/developers/contributing.rst @@ -218,10 +218,20 @@ rules before submitting a pull request: ``sklearn.utils`` submodule. A list of utility routines available for developers can be found in the :ref:`developers-utils` page. - * If your pull request addresses an issue, please use the title to describe - the issue and mention the issue number in the pull request description to - ensure a link is created to the original issue. - + * Give your pull request a helpful title that summarises what your + contribution does. In some cases "Fix " is enough. + "Fix #" is not enough. + + * Often pull requests resolve one or more other issues (or pull requests). + If merging your pull request means that some other issues/PRs should + be closed, you should `use keywords to create link to them + `_ + (e.g., ``Fixes #1234``; multiple issues/PRs are allowed as long as each + one is preceded by a keyword). Upon merging, those issues/PRs will + automatically be closed by GitHub. If your pull request is simply + related to some other issues/PRs, create a link to them without using + the keywords (e.g., ``See also #1234``). + * All public methods should have informative docstrings with sample usage presented as doctests when appropriate.