CL "BUG" Syntax

(Based on PSA in

Bugdroid [1] has recently updated the set of "BUG=" formats that it accepts. The most visible change is that the "BUG=project:n" format is more universally [2] accepted, so you may already have noticed more bug updates coming in for commits that were previously ignored. The matching rules have also been cleaned up a bit, so they should no longer produce some common false-positives, like treating 'disable_nacl=1' as a nacl bug.

Below is the specification of officially supported formats, based on the previous patterns and observed usage (regression tested against thousands of actual commit messages). The pattern-matching rules are still fairly loose, so some not-quite-right formats, like "BUG====n", may work, but are not guaranteed. Please let me know if you encounter any formats that you expect to work but which don't.

  Supported Syntax:
  BUG n
    Matches issue 'n' in the default issue tracker for the repository (e.g. skia tracker for skia repos, chromium tracker for chromium and blink, etc.).

  BUG project:n
    Matches issue 'n' in the issue tracker for 'project'.

  BUG=<Issue Tracker URL>
    A direct link to an issue tracker page matches that issue.

  Syntax Notes:
  - The keywords 'BUG' and 'ISSUE' are interchangeable in all formats.
  - 'n' can be a comma-delimited list of bug #'s.
  - If 'n' is a list, all items belong to the most recent project specifier preceding the list, e.g.:
    is equivalent to:
  - Multiple bug lines may appear in the commit message.
  - Project/URL specification only works for configured projects [2].

[1] Note that there are at least two things called "bugdroid". This change refers to the one that monitors the main svn repos and non-gerrit git repos. Gerrit-based git repos are handled by a separate process where the allowed syntax is much more limited, essentially just BUG=n. These bugdroids should probably merge at some point, but there is currently no plan for it. These have been merged. Yay!

[2] Where "universal" is defined as the set of known projects [3] configured for each repo. For instance, a bug in the blink repo can specify "BUG=chromium:n", but not "BUG=skia:n", because that just seems unlikely. If you encounter a case where one project should be able to create bugs for another, but can't, let me know.

[3] "Known projects" are the issue trackers which have been configured to allow read/write access for the bugdroid account, currently chromium, nativeclient, webrtc, v8, and skia.