mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-27 23:02:16 -05:00
guix: ci: Add spec support to latest-evaluations.
* guix/ci.scm (latest-evaluations): Add spec parameter support.
This commit is contained in:
parent
a2155f41f5
commit
316d9e0817
1 changed files with 15 additions and 8 deletions
23
guix/ci.scm
23
guix/ci.scm
|
@ -154,14 +154,21 @@ (define (evaluation url evaluation)
|
||||||
(number->string evaluation)))))
|
(number->string evaluation)))))
|
||||||
(json->evaluation evaluation)))
|
(json->evaluation evaluation)))
|
||||||
|
|
||||||
(define* (latest-evaluations url #:optional (limit %query-limit))
|
(define* (latest-evaluations url
|
||||||
"Return the latest evaluations performed by the CI server at URL."
|
#:optional (limit %query-limit)
|
||||||
(map json->evaluation
|
#:key spec)
|
||||||
(vector->list
|
"Return the latest evaluations performed by the CI server at URL. If SPEC
|
||||||
(json->scm
|
is passed, only consider the evaluations for the given SPEC specification."
|
||||||
(http-fetch (string-append url "/api/evaluations?nr="
|
(let ((spec (if spec
|
||||||
(number->string limit)))))))
|
(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))
|
(define* (evaluations-for-commit url commit #:optional (limit %query-limit))
|
||||||
"Return the evaluations among the latest LIMIT evaluations that have COMMIT
|
"Return the evaluations among the latest LIMIT evaluations that have COMMIT
|
||||||
|
|
Loading…
Reference in a new issue