aboutsummaryrefslogtreecommitdiff
path: root/guix-qa-frontpage/manage-builds.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-08-25 09:19:04 +0100
committerChristopher Baines <mail@cbaines.net>2023-08-25 09:19:04 +0100
commite590ffcc3d22da103b4698f6abe128065bfced14 (patch)
treee2dc9efce20cb8bf07c907a8624d7b4c2fd81acf /guix-qa-frontpage/manage-builds.scm
parent92641feae5085d5e26411a6e6f6d721b750e5d20 (diff)
downloadqa-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/manage-builds.scm')
-rw-r--r--guix-qa-frontpage/manage-builds.scm7
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)