findmissing: gerrit_interface: Reference originating commit if there is no BUG

If we are generating a CL against a previous commit into a ChromeOS branch,
and the offending patch does not have a BUG= entry or specifies BUG=None,
we want to have a reference against that CL in the commit message.

While at it, select last instead of first BUG= and TEST= message, in the
assumption that the last message in the file (if there is more than one)
is more relevant than the first.


Change-Id: Ic466e213c091187e1ae61c922b4eec73c7b513a4
Reviewed-by: Curtis Malainey <>
Commit-Queue: Guenter Roeck <>
Tested-by: Guenter Roeck <>
1 file changed