     (println (format "Deleted webhook for %s/%s" user name))))
 
 (defn create-all-webhooks
-  "Creates webhooks for all repositories that don't have one in $GITHUB_APP_DOMAIN"
+  "Creates webhooks for all repositories that don't have one in $GITHUB_APP_DOMAIN."
   []
   (let [has-gh-webhook #(some #{(full-url-for "/webhook")} (map :url (:hooks %)))
         repos (remove has-gh-webhook (list-repos-with-hooks))]
     (doseq [repo repos]
       (create-webhook (:owner repo) (:name repo)))))
 
-(defn create-issue-comment [db issue-id issue-num]
+(defn create-issue-comment
+  "Creates a comment for an issue given a map (db of issues)."
+  [db issue-id issue-num]
   (let [issue (or
                (some #(and (= (:id %) issue-id) %) (viewable-issues db))
                (throw (ex-info "No issue found for webhook" {:issue-id issue-id})))

       (map-indexed (fn [num elem]
                      (assoc elem :position (inc num))))))

(defn- comment-body [issue]
  (str
   (if (= (:type issue) "pull request")
     "Thanks for your pull request!"

                     user name (:id result)))))

(defn repo-hooks
  "List hooks for an individual repository."
  [user name]
  (->>
   (hooks user name (gh-auth))
   (map (fn [h]
          {:url (get-in h [:config :url]) :id (:id h) :name (:name h)}))))

(defn- list-repos
  []
  (let [all-repos (repos (assoc (gh-auth) :type "public" :all-pages true))
        filter-fn (if (hook-forks) identity (comp not :fork))]
