From 13ec3ab8addd61cfc1b6a98561fa57b410f54a55 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 18 Jun 2025 16:38:22 +0100 Subject: Parse the cover letter for the branch name, if there is one --- guix-qa-frontpage/patchwork.scm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/guix-qa-frontpage/patchwork.scm b/guix-qa-frontpage/patchwork.scm index 724e6f3..c905a59 100644 --- a/guix-qa-frontpage/patchwork.scm +++ b/guix-qa-frontpage/patchwork.scm @@ -172,13 +172,17 @@ branch))))))) (define (patchwork-series->branch series) - (match (assoc-ref series "patches") - (#() "master") - (#(first-patch rest ...) - (let ((details - (parse-patch-name - (assoc-ref first-patch "name")))) - (assq-ref details 'branch))))) + (if (list? (assoc-ref series "cover_letter")) + (parse-patch-name + (assoc-ref (assoc-ref series "cover_letter") + "name")) + (match (assoc-ref series "patches") + (#() "master") + (#(first-patch rest ...) + (let ((details + (parse-patch-name + (assoc-ref first-patch "name")))) + (assq-ref details 'branch)))))) (define %patchwork-series-default-count (make-parameter #f)) -- cgit v1.2.3