summaryrefslogtreecommitdiff
path: root/guix/ci.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/ci.scm')
-rw-r--r--guix/ci.scm25
1 files changed, 16 insertions, 9 deletions
diff --git a/guix/ci.scm b/guix/ci.scm
index c70e5bb9e6..0af04ff97d 100644
--- a/guix/ci.scm
+++ b/guix/ci.scm
@@ -100,7 +100,7 @@
json->evaluation
(id evaluation-id) ;integer
(spec evaluation-spec "specification") ;string
- (complete? evaluation-complete? "in-progress"
+ (complete? evaluation-complete? "status"
(match-lambda
(0 #t)
(_ #f))) ;Boolean
@@ -154,14 +154,21 @@ string such as \"x86_64-linux\"), restrict to builds for SYSTEM."
(number->string evaluation)))))
(json->evaluation evaluation)))
-(define* (latest-evaluations url #:optional (limit %query-limit))
- "Return the latest evaluations performed by the CI server at URL."
- (map json->evaluation
- (vector->list
- (json->scm
- (http-fetch (string-append url "/api/evaluations?nr="
- (number->string limit)))))))
-
+(define* (latest-evaluations url
+ #:optional (limit %query-limit)
+ #:key spec)
+ "Return the latest evaluations performed by the CI server at URL. If SPEC
+is passed, only consider the evaluations for the given SPEC specification."
+ (let ((spec (if spec
+ (format #f "&spec=~a" spec)
+ "")))
+ (map json->evaluation
+ (vector->list
+ (json->scm
+ (http-fetch
+ (string-append url "/api/evaluations?nr="
+ (number->string limit)
+ spec)))))))
(define* (evaluations-for-commit url commit #:optional (limit %query-limit))
"Return the evaluations among the latest LIMIT evaluations that have COMMIT