diff options
author | Christopher Baines <mail@cbaines.net> | 2022-10-25 21:15:02 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2022-10-25 21:15:02 +0100 |
commit | 733a22a26b3772c3a081b7b88e3652f10971c9c8 (patch) | |
tree | 7ce7069672d5bf944abda9daee28d7b0cadd4ef0 /guix-qa-frontpage/guix-data-service.scm | |
parent | 886295cbd1dd00f5a5310f82140c6b12544356c2 (diff) | |
download | qa-frontpage-733a22a26b3772c3a081b7b88e3652f10971c9c8.tar qa-frontpage-733a22a26b3772c3a081b7b88e3652f10971c9c8.tar.gz |
Adopt managing patch branches
This previously happened with some scripts run through Laminar, this commit
moves the functionality here.
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)) |