   (if (and (contains? build :end) (contains? build :end))
     (- (build :end) (build :start))))
 
-(defn- average-runtime-for [summary buildDataEntries]
-  (let [runtimes (filter (complement nil?) (map duration-for buildDataEntries))]
+(defn- average-runtime-for [summary build-data-entries]
+  (let [runtimes (filter (complement nil?) (map duration-for build-data-entries))]
     (if (not (empty? runtimes))
       (assoc summary :averageRuntime (avg runtimes))
       summary)))
 
-(defn- total-count-for [summary buildDataEntries]
-  (assoc summary :totalCount (count buildDataEntries)))
+(defn- total-count-for [summary build-data-entries]
+  (assoc summary :totalCount (count build-data-entries)))
 
 (defn- builds-with-outcome [build-data-entries]
   (filter #(contains? % :outcome) build-data-entries))

    (@builds job)
    {}))

(defn- store-build! [job build buildData]
  (let [entry (job-entry job)
        updatedEntry (assoc entry build buildData)]
    (swap! builds assoc job updatedEntry)
    {:body buildData}))

(defn- get-build [job build]
  (if (contains? @builds job)
    (if-let [buildData ((@builds job) build)]
      {:body buildData}
      {:status 404})
    {:status 404}))


    summary))

(defn- summary-for [job]
  (let [build-data-entries (vals (@builds job))]
    (-> {}
        (average-runtime-for build-data-entries)
        (total-count-for build-data-entries)
        (error-count-for build-data-entries)
        (flaky-runs-for build-data-entries))))

(defn- get-pipeline []
  (let [jobNames (keys @builds)
