fromupstream: use more strict regular expression

Use '^' (start of the string) and '$' (end of the string) to prevent
from matching inline BUG= and TEST=.

BUG=None
TEST=1. git commit --allow-empty -F - <<EOD
Test if inline BUG=this is not a bug ID.
Test if inline TEST=this is not a test.

BUG=1234
BUG=5678
TEST=real test
EOD
2. fromupstream.py -r -d pw://11123203
3. fromupstream.py -r -d linux://d85f6b93a76e
4. fromupstream.py -r -d git://mark/for-next/96ed76983307
5. fromupstream.py -r -d https://cros#master/eb8e661

Change-Id: I9de6855f6faf63defa503a9041d653bf529e3767
Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/1780430
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed