From 3d9946a6bdc57863ba6ff3728a67f24fcdb540ba Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Thu, 9 Jan 2025 21:14:53 +0000 Subject: [PATCH] Give friendly error on empty backlog repo Currently you get a complicated error about a nil dereference. This makes it clear what happened. --- common-theme/layouts/_default/backlog.html | 2 +- common-theme/layouts/_default/success.html | 17 +++++++++++++++-- .../partials/block/issues-list-as-blocks.html | 11 ++++++++--- org-cyf-piscine/go.mod | 4 ++-- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/common-theme/layouts/_default/backlog.html b/common-theme/layouts/_default/backlog.html index bccadea0e..f3d1ceb42 100644 --- a/common-theme/layouts/_default/backlog.html +++ b/common-theme/layouts/_default/backlog.html @@ -14,7 +14,7 @@ for each repo, grab the issues that match the filter */}} {{ range $repos }} - {{ $issueBlocks := partial "block/issues-list-as-blocks.html" (dict "backlog" . "backlog_filter" $backlog_filter) }} + {{ $issueBlocks := partial "block/issues-list-as-blocks.html" (dict "backlog" . "backlog_filter" $backlog_filter "path" $currentPath) }} {{ $repo := . }} {{ range $issueBlocks }}