-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Add a section to the PR guide on how to write good titles and descriptions #1845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -203,6 +203,7 @@ should do to help ensure that your pull request is accepted. | |||||
|
|
||||||
| #. Proper :ref:`documentation <documenting>` additions/changes should be included. | ||||||
|
|
||||||
|
|
||||||
| .. _news-entry: | ||||||
| .. _what-s-new-and-news-entries: | ||||||
|
|
||||||
|
|
@@ -503,9 +504,7 @@ This will get your changes up to GitHub. | |||||
| Now you want to | ||||||
| `create a pull request from your fork | ||||||
| <https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork>`__. | ||||||
| If this is a pull request in response to a pre-existing issue on the | ||||||
| `issue tracker`_, please make sure to reference the issue number using | ||||||
| ``gh-NNNNN:`` prefix in the pull request title and ``#NNNNN`` in the description. | ||||||
| See :ref:`the section below on writing good titles and descriptions <good-pull-request-metadata>`. | ||||||
|
|
||||||
| If this is a pull request for an unreported issue (assuming you already | ||||||
| performed a search on the issue tracker for a pre-existing issue), create a | ||||||
|
|
@@ -525,6 +524,28 @@ A detailed commit history allows reviewers to view the diff of one commit to | |||||
| another so they can easily verify whether their comments have been addressed. | ||||||
| The commits will be squashed when the pull request is merged. | ||||||
|
|
||||||
| .. _good-pull-request-metadata: | ||||||
|
|
||||||
| Write good titles and descriptions | ||||||
| ---------------------------------- | ||||||
|
|
||||||
| Reviewers want to be able to understand roughly what your pull request does | ||||||
| before reading the changes. | ||||||
|
|
||||||
| The title should be a sentence or phrase in the imperative which says what the | ||||||
| pull request does in short form. | ||||||
| Pull requests attached to issues should be linked by putting the issue number in | ||||||
| the title (``gh-NNNNNN:``). | ||||||
| For example, ``gh-12345: Fix bug when spam module is served with eggs``. | ||||||
|
|
||||||
| The pull request description field should be a detailed summary. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
The amount of descriptions we get now with a list of tests that they ran and passed is quite annoying (all clearly straight from an AI, of course. :-/ ) |
||||||
| This is a great place to note caveats, provide links to references, and explain | ||||||
| decisions made in the pull request. | ||||||
| Avoid over-explaining: simpler descriptions are easier to read, so make sure not | ||||||
| to write large descriptions for simple changes. | ||||||
|
|
||||||
| Use ``#NNNNN`` in the description to refer to and link relevant issues. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't quite want this here IMO, since the bot automatically links the issue we'll just end up with duplicate references. |
||||||
|
|
||||||
|
|
||||||
| Converting an existing patch from b.p.o to GitHub | ||||||
| ================================================= | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid I think this is a little odd, we are now jumping away from the section for some very key information (the amount of PR titles I've fixed is staggering).
I think it's very much in scope now, considering we're editing it ;-) If we want minimal changes in this PR, then let's just add the content directly to the section IMO.
Additionally, I think this makes more sense after the following two comments, as we assume you already have an issue number.