diff options
Diffstat (limited to 'guix-qa-frontpage/guix-data-service.scm')
-rw-r--r-- | guix-qa-frontpage/guix-data-service.scm | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/guix-qa-frontpage/guix-data-service.scm b/guix-qa-frontpage/guix-data-service.scm index bde6628..3996cea 100644 --- a/guix-qa-frontpage/guix-data-service.scm +++ b/guix-qa-frontpage/guix-data-service.scm @@ -18,7 +18,9 @@ list-branches branch-derivation-changes-url - branch-derivation-changes)) + branch-derivation-changes + + get-latest-processed-branch-revision)) (define* (patch-series-derivation-changes-url checks #:key systems) (define comparison-check @@ -152,3 +154,21 @@ json-body))))))) #:times 6 #:delay 30)) + +(define (get-latest-processed-branch-revision branch) + (retry-on-error + (lambda () + (let-values (((response body) + (http-get (string->uri + (string-append + "https://data.qa.guix.gnu.org" + "/repository/2" + "/branch/" branch + "/latest-processed-revision.json"))))) + (let ((json-body + (json-string->scm (utf8->string body)))) + (assoc-ref + (assoc-ref json-body "revision") + "commit")))) + #:times 5 + #:delay 30)) |