0

contributing.md: document CL footers

This change migrates the Chromium browser's primary documentation for
CL footers from the Chromium site:
https://dev.chromium.org/developers/contributing-code/-bug-syntax
into the in-tree contributing guide.

There are two bugs to correct the language used in this change:
* https://crbug.com/1108213
* https://crbug.com/1108214

Test: Gitiles preview
Change-Id: I3c67aa008c3d77edc373531a8a698e3af033be0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2311826
Commit-Queue: Kalvin Lee <kdlee@chromium.org>
Reviewed-by: Tal Pressman <talp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790739}
This commit is contained in:
Kalvin Lee
2020-07-22 07:36:28 +00:00
committed by Commit Bot
parent a650b47690
commit 2359883541

@ -161,9 +161,9 @@ Bug: 123456
A short subject and a blank line after the subject are crucial: `git` uses this
as a heuristic for tools like `git log --oneline`. Use the bug number from the
[issue tracker][crbug] (see more on [CL footer syntax][cl-footer-syntax]). Also
see [How to Write a Git Commit Message][good-git-commit-message], which has more
in-depth tips for writing a good commit description.
[issue tracker][crbug] (see more on [CL footer syntax](#cl-footer-reference)).
Also see [How to Write a Git Commit Message][good-git-commit-message], which
has more in-depth tips for writing a good commit description.
### Chromium-specific description tips
@ -376,12 +376,90 @@ If you would like to be notified about changes to a set of files covering a
topic or an area of Chromium, you may use the [watchlists][watchlist-doc]
feature in order to receive email notifications.
## Appendix: CL footer reference {#cl-footer-reference}
Chromium stores a lot of information in footers at the bottom of commit
messages. With the exception of `R=`, these footers are only valid in the
last paragraph of a commit message; any footers separated from the last
line of the message by whitespace or non-footer lines will be ignored.
This includes everything from the unique `Change-Id` which identifies a
Gerrit change, to more useful metadata like bugs the change helps fix,
trybots which should be run to test the change, and more. This section
includes a listing of well-known footers, their meanings, and their
formats.
* **Bug:**
* A comma-separated list of bug references.
* A bug reference
* can be a bare number, e.g. `Bug: 123456`, or
* can specify a project and a number, e.g. `Bug: skia:1234`.
* On chromium-review, the default project is assumed to be `chromium`,
so all bugs in non-chromium projects on bugs.chromium.org should be
qualified by their project name.
* The Google-internal issue tracker is accessible by using the `b:`
project prefix.
* **Fixed:** The same as `Bug:`, but will automatically close the
bug(s) as fixed when the CL lands.
* **R=**
* This footer is _deprecated_ in the Chromium project; it was
deprecated when code review migrated to Gerrit. Instead, use
`-r foo@example.com` when running `git cl upload`.
* A comma-separated list of reviewer email addresses (e.g.
foo@example.com, bar@example.com).
* **Tbr:** The same format as the `R` footer, but indicates to the
commit queue that it can skip checking that all files in the change
have been approved by their respective `OWNERS`.
* **Cq-Include-Trybots:**
* A comma-separated list of trybots which should be triggered and
checked by the CQ in addition to the normal set.
* Trybots are indicated in `master:builder` format (e.g.
`tryserver.chromium.linux:linux_asan_experimental`).
* **No-Presubmit:**
* If present, the value should always be the string `true`.
* Indicates to the CQ that it should not run presubmit checks on the CL.
* Used primarily on automated reverts.
* **No-Try:**
* If present, the value should always be the string `true`.
* Indicates to the CQ that it should not start or check the results of
any tryjobs.
* Used primarily on automated reverts.
* **No-Tree-Checks:**
* If present, the value should always be the string `true`.
* Indicates to the CQ that it should ignore the tree status and submit
the change even to a closed tree.
* Used primarily on automated reverts.
* **Test:**
* A freeform description of manual testing performed on the change.
* Not necessary if all testing is covered by trybots.
* **Reviewed-by:**
* Automatically added by Gerrit when a change is submitted.
* Lists the names and email addresses of the people who approved
(set the `Code-Review` label on) the change prior to submission.
* **Reviewed-on:**
* Automatically added by Gerrit when a change is submitted.
* Links back to the code review page for easy access to comment and
patch set history.
* **Change-Id:**
* Automatically added by `git cl upload`.
* A unique ID that helps Gerrit keep track of commits that are part of
the same code review.
* **Cr-Commit-Position:**
* Automatically added by the git-numberer Gerrit plugin when a change
is submitted.
* This is of the format `fully/qualified/ref@{#123456}` and gives both
the branch name and "sequence number" along that branch.
* This approximates an SVN-style monotonically increasing revision
number.
* **Cr-Branched-From:**
* Automatically added by the git-numberer Gerrit plugin on changes
which are submitted to non-master branches.
* Aids those reading a non-master branch history in finding when a
given commit diverged from master.
[//]: # (the reference link section should be alphabetically sorted)
[checkout-and-build]: https://chromium.googlesource.com/chromium/src/+/master/docs/#checking-out-and-building
[chrome-dd-review-process]: http://go/chrome-dd-review-process
[chromium-design-docs]: https://groups.google.com/a/chromium.org/forum/#!forum/chromium-design-docs
[cl-footer-syntax]: https://dev.chromium.org/developers/contributing-code/-bug-syntax
[code-reviews-owners]: code_reviews.md#OWNERS-files
[code-reviews]: code_reviews.md
[commit-checklist]: commit_checklist.md