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
17
guix/ci.scm
17
guix/ci.scm
|
@ -154,14 +154,21 @@ (define (evaluation url evaluation)
|
|||
(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."
|
||||
(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)))))))
|
||||
|
||||
(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
|
||||
|
|
Loading…
Reference in a new issue