This is an automated email from the git hooks/post-receive script.
civodul pushed a commit to branch main
in repository guix-cuirass.
The following commit(s) were added to refs/heads/main by this push:
new 18d3b03 templates: Build page gracefully handles empty history.
18d3b03 is described below
commit 18d3b0328d5ce2ceb01ab7a2338990db177b6319
Author: Ludovic Courtès <[email protected]>
AuthorDate: Thu Jul 18 15:12:47 2024 +0200
templates: Build page gracefully handles empty history.
* src/cuirass/templates.scm (build-details)[build-failure-info]:
Gracefully handle empty HISTORY.
---
src/cuirass/templates.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index eab81d9..7d49294 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -742,8 +742,12 @@ the existing SPEC otherwise."
(if (= (build-status failed) (build-current-status build))
(if (= (build-weather new-failure) (build-current-weather build))
`((p "Channel changes compared to the "
- (a (@ (href "/build/" ,(build-id (first history)) "/details"))
- "previous (successful) build")
+ ,(match history
+ (()
+ "previous (successful) build")
+ ((previous _ ...)
+ `(a (@ (href "/build/" ,(build-id previous) "/details"))
+ "previous (successful) build")))
":"
,(checkout-change-table channels
previous-checkouts checkouts)))