aboutsummaryrefslogtreecommitdiff
path: root/guix-qa-frontpage/view/branches.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2025-01-06 12:24:58 +0000
committerChristopher Baines <mail@cbaines.net>2025-01-06 12:24:58 +0000
commit33244c18ac0c080345baab491a46868187ca34e2 (patch)
tree9af3bb80d73f810f9786c0a739dbb417e2fdba48 /guix-qa-frontpage/view/branches.scm
parentdadfd92bc9155c13137f2738013e03a80c3aa3f6 (diff)
downloadqa-frontpage-33244c18ac0c080345baab491a46868187ca34e2.tar
qa-frontpage-33244c18ac0c080345baab491a46868187ca34e2.tar.gz
Improve the branches page
And add a JSON repsonse.
Diffstat (limited to 'guix-qa-frontpage/view/branches.scm')
-rw-r--r--guix-qa-frontpage/view/branches.scm22
1 files changed, 17 insertions, 5 deletions
diff --git a/guix-qa-frontpage/view/branches.scm b/guix-qa-frontpage/view/branches.scm
index 90d1da7..9573d2b 100644
--- a/guix-qa-frontpage/view/branches.scm
+++ b/guix-qa-frontpage/view/branches.scm
@@ -10,10 +10,22 @@
#:body
`((main
(table
+ (thead
+ (tr (th "Branch")
+ (th "Request to merge")))
(tbody
- ,@(map (lambda (branch-details)
- (let ((name (assoc-ref branch-details "name")))
- `(tr
- (td (a (@ (href ,(simple-format #f "/branch/~A" name)))
- ,name)))))
+ ,@(map (match-lambda
+ ((name . details)
+ (let ((issue-number
+ (assoc-ref details "issue_number")))
+ `(tr
+ (td (a (@ (href ,(simple-format #f "/branch/~A" name))
+ (style "font-family: monospace;"))
+ ,name))
+ (td ,@(if issue-number
+ `((a (@ (href ,(string-append
+ "https://issues.guix.gnu.org/"
+ (number->string issue-number))))
+ "#" ,issue-number))
+ '()))))))
branches)))))))