                 spec
                 (conj (or (:task-defaults spec) {})
                       {:job_id (:id job)})
-                (or (:script-defaults spec) {}))]
+                (deep-merge script-base-defaults (or (:script-defaults spec) {})))]
     (doseq [raw-task tasks]
       (wrap-exception-create-job-issue
         job "Error during task creation"

                                               script-defaults)))
           context)))

(defn build-tasks
  "Build the tasks for the given top-level specification."
  [job _spec]

    scripts
    (throw (IllegalStateException. (str ":scripts must a map " scripts)))))

(defn- coerce-script-value [value]
  (cond
    (map? value) value
    (string? value) {:body value}
    :else (throw (IllegalStateException.
                   (str "don't know how to handle type " (type value))))))

