diff options
author | Christopher Baines <mail@cbaines.net> | 2025-06-18 16:38:22 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2025-06-18 16:38:22 +0100 |
commit | 13ec3ab8addd61cfc1b6a98561fa57b410f54a55 (patch) | |
tree | 30703d94c09cb72565365b3165f18f666f99a780 | |
parent | 81b25f6edbbe9aacb232f86fa99c27c97e3b35f2 (diff) | |
download | qa-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.scm | 18 |
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)) |