]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ptl-tool: skip empty comment body 22017/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 15 May 2018 17:45:20 +0000 (10:45 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 15 May 2018 17:45:20 +0000 (10:45 -0700)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/script/ptl-tool.py

index 6c92bfae428f8fdb492b54b9d8336b0f0fb89d7d..bc1338a792a4c3a3bf1dee4e3ba9b86676b54cf3 100755 (executable)
@@ -260,14 +260,15 @@ def build_branch(args):
         indications = set()
         for comment in [pr_req.json()]+comments.json()+reviews.json()+review_comments.json():
             body = comment["body"]
-            url = comment["html_url"]
-            for m in BZ_MATCH.finditer(body):
-                log.info("[ {url} ] BZ cited: {cite}".format(url=url, cite=m.group(1)))
-            for m in TRACKER_MATCH.finditer(body):
-                log.info("[ {url} ] Ceph tracker cited: {cite}".format(url=url, cite=m.group(1)))
-            for indication in INDICATIONS:
-                for cap in indication.findall(comment["body"]):
-                    indications.add(cap)
+            if body:
+                url = comment["html_url"]
+                for m in BZ_MATCH.finditer(body):
+                    log.info("[ {url} ] BZ cited: {cite}".format(url=url, cite=m.group(1)))
+                for m in TRACKER_MATCH.finditer(body):
+                    log.info("[ {url} ] Ceph tracker cited: {cite}".format(url=url, cite=m.group(1)))
+                for indication in INDICATIONS:
+                    for cap in indication.findall(comment["body"]):
+                        indications.add(cap)
 
         new_new_contributors = {}
         for review in reviews.json():