Rewrite 'pull-os-versions' script in Javascript to add support for reporting os revis...
[WebKit-https.git] / Websites / perf.webkit.org / public / api / commits.php
index 882c7eb..a6a4db8 100644 (file)
@@ -32,7 +32,12 @@ function main($paths) {
     } else if ($filter == 'latest') {
         $commits = $fetcher->fetch_latest($repository_id);
     } else if ($filter == 'last-reported') {
-        $commits = $fetcher->fetch_last_reported($repository_id);
+        $from = array_get($_GET, 'from');
+        $to = array_get($_GET, 'to');
+        if ($from && $to)
+            $commits = $fetcher->fetch_last_reported_between_orders($repository_id, $from, $to);
+        else
+            $commits = $fetcher->fetch_last_reported($repository_id);
     } else if (ctype_alnum($filter)) {
         $commits = $fetcher->fetch_revision($repository_id, $filter);
     } else { // V2 UI compatibility.