                         :results results}))
 
 (defn run-emend
-    [job-name path-to-emender path-to-tests tests book-directory delete-workdirs?]
+    [job-name repo-url branch path-to-emender path-to-tests tests book-directory delete-workdirs?]
     (println "Starting Emend against the book directory" book-directory)
     (println book-directory)
     (println (type book-directory))

        (let [;clone-results {:directory (new java.io.File "/tmp/emender-service-1460560704093/")}]
              clone-results (git-utils/clone-remote-repository repo-url branch)]
             (if (= (:status clone-results) :ok)
                 (run-emend job-name path-to-emend path-to-tests tests
                            (.getAbsolutePath (:directory clone-results))
                            delete-workdirs?)
                 (do

                (if delete-workdirs?
                    (file-utils/remove-temporary-directory book-directory))
                (if results
                    (process-results job-name repo-url branch results)
                    (send-response {:status :reading-job-result-failed})))
            (catch Exception e
                (if delete-workdirs?
                    (file-utils/remove-temporary-directory book-directory))
