autobump: add an allowed file suffix list

It doesn't ever make sense to put a SRC_URI in a bbappend but it
happened anyway:

https://github.com/openbmc/openbmc/commit/2d392adf8491fbc6a75d160bbc41755a54da7921

This is far outside the intended scope of the script and the parsing
logic falls apart.  Avoid the problem by filtering the git grep results
and only process files that end in bb, inc or bbclass.

Change-Id: I01d646f26f11e0167e9b983251405bd28969f0bc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/openbmc-autobump/openbmc-autobump.py b/openbmc-autobump/openbmc-autobump.py
index cbe8978..4531b61 100755
--- a/openbmc-autobump/openbmc-autobump.py
+++ b/openbmc-autobump/openbmc-autobump.py
@@ -91,7 +91,10 @@
         log('{}'.format(e), args)
         return []
 
-    grep_args = ['-l', '-e', '_URI', '--and', '-e', 'github.com/openbmc']
+    match_suffixes = ('bb', 'bbclass', 'inc')
+    pathspecs = ('*.{}'.format(x) for x in match_suffixes)
+    grep_args = ('-l', '-e', '_URI', '--and', '-e', 'github.com/openbmc')
+    grep_args = (*grep_args, *pathspecs)
     try:
         return git.grep(*grep_args, _cwd=meta).stdout.decode('utf-8').split()
     except sh.ErrorReturnCode_1: