
def check_lines(api, config):
    repos = config.get('repos')
    pr = api.payload.get('pull_request')
    if not (repos and pr and api.payload.get('action') == 'opened'):
        return

    repo_config = api.get_matches_from_config(repos)
    matches = repo_config.items()
    lines = api.get_added_lines()

    # FIXME: Change this to regex?
    messages = [msg for line in lines for match, msg in matches if match in line]

    if messages:
        lines = '\n'.join(map(lambda line: ' * %s' % line, messages))
        comment = ':warning: **Warning!** :warning:\n\n%s' % lines
        api.post_comment(comment)


methods = [check_lines]

@@ -1,8 +1,19 @@
+import re%0A%0A
 %0Adef che
@@ -319,43 +319,8 @@
 ()%0A%0A
-    # FIXME: Change this to regex?%0A
     
@@ -386,21 +386,30 @@
  if 
+re.search(
 match
- in
+,
  line
+)
 %5D%0A%0A 

Change matching to regex