aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2025-06-18 16:38:22 +0100
committerChristopher Baines <mail@cbaines.net>2025-06-18 16:38:22 +0100
commit13ec3ab8addd61cfc1b6a98561fa57b410f54a55 (patch)
tree30703d94c09cb72565365b3165f18f666f99a780
parent81b25f6edbbe9aacb232f86fa99c27c97e3b35f2 (diff)
downloadqa-frontpage-13ec3ab8addd61cfc1b6a98561fa57b410f54a55.tar
qa-frontpage-13ec3ab8addd61cfc1b6a98561fa57b410f54a55.tar.gz
Parse the cover letter for the branch name, if there is one
-rw-r--r--guix-qa-frontpage/patchwork.scm18
1 files 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))