                            (map (partial match-pr-file pr-files))
                            (filter :pull-req-file)
                            (map (partial create-comment user reponame pr-id sha comments))
+                           (filter identity)
                            count)]
             (println "Created" cnt "comments.")))))))
 

   {:keys [pull-req-file line msg file] :as result}]
  (let [patch    (:patch pull-req-file)
        rel-line (utils/abs-line->patch-line patch line)]
    (when-not (comment-exists? result comments)
      (prn
        (pulls/create-comment 
          user reponame id sha 
          file rel-line msg 
          {:auth github-basic-auth})))))

(defn- handle-pull-req 
  "Clones the repo and checks out the PR's latest sha.

(defn- comment-exists? 
  "Returns true if the comment exists in the same 
file, the same line and the content is the same."
  [{:keys [file msg] :as result} rel-line comments]
  (some (fn [{:keys [position body path]}]
          (and
            (= file path)
            (= rel-line position)
            (= msg body)))
    comments))

