aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-10-21 16:42:17 +0100
committerChristopher Baines <mail@cbaines.net>2023-10-21 16:42:17 +0100
commitb10142110a9915838368d381d65493c28304a55d (patch)
treeba2ff93c501e3eff1cd1dd61f4a7b72217555699
parent77ac35e2ccf47aee813d8bf303b69580e26edb8c (diff)
downloadqa-frontpage-b10142110a9915838368d381d65493c28304a55d.tar
qa-frontpage-b10142110a9915838368d381d65493c28304a55d.tar.gz
Handle the case when a series has no patches
In patchwork-series->branch.
-rw-r--r--guix-qa-frontpage/manage-patch-branches.scm15
1 files changed, 7 insertions, 8 deletions
diff --git a/guix-qa-frontpage/manage-patch-branches.scm b/guix-qa-frontpage/manage-patch-branches.scm
index 63d1054..886b429 100644
--- a/guix-qa-frontpage/manage-patch-branches.scm
+++ b/guix-qa-frontpage/manage-patch-branches.scm
@@ -178,14 +178,13 @@
(analyze bug-number feature-branch version index total arguments))))))
(define (patchwork-series->branch series)
- (let* ((first-patch
- (vector-ref
- (assoc-ref series "patches")
- 0))
- (details
- (parse-patch-name
- (assoc-ref first-patch "name"))))
- (assq-ref details 'branch)))
+ (match (assoc-ref series "patches")
+ (#() "master")
+ (#(first-patch rest ...)
+ (let ((details
+ (parse-patch-name
+ (assoc-ref first-patch "name"))))
+ (assq-ref details 'branch)))))
(define (create-branch-for-issue database issue-number patchwork-series)
(define branch-name