diff options
author | Christopher Baines <mail@cbaines.net> | 2023-08-25 09:19:04 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-08-25 09:19:04 +0100 |
commit | e590ffcc3d22da103b4698f6abe128065bfced14 (patch) | |
tree | e2dc9efce20cb8bf07c907a8624d7b4c2fd81acf /guix-qa-frontpage | |
parent | 92641feae5085d5e26411a6e6f6d721b750e5d20 (diff) | |
download | qa-frontpage-e590ffcc3d22da103b4698f6abe128065bfced14.tar qa-frontpage-e590ffcc3d22da103b4698f6abe128065bfced14.tar.gz |
Avoid take not working when there are less than 2 merge requests
Diffstat (limited to 'guix-qa-frontpage')
-rw-r--r-- | guix-qa-frontpage/manage-builds.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/guix-qa-frontpage/manage-builds.scm b/guix-qa-frontpage/manage-builds.scm index 019c758..d3533f6 100644 --- a/guix-qa-frontpage/manage-builds.scm +++ b/guix-qa-frontpage/manage-builds.scm @@ -287,6 +287,11 @@ (simple-format #t "no derivation changes url for branch ~A\n" branch)))) +(define (take* lst n) + (if (< (length lst) n) + lst + (take lst n))) + (define (start-submit-branch-builds-thread database build-coordinator guix-data-service) @@ -340,7 +345,7 @@ (with-throw-handler #t (lambda () (let* ((branches - (take + (take* (filter (match-lambda ((name . details) |