File tree Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 14
14
for each repo, grab the issues that match the filter
15
15
*/}}
16
16
{{ range $repos }}
17
- {{ $issueBlocks := partial "block/issues-list-as-blocks.html" (dict "backlog" . "backlog_filter" $backlog_filter) }}
17
+ {{ $issueBlocks := partial "block/issues-list-as-blocks.html" (dict "backlog" . "backlog_filter" $backlog_filter "path" $currentPath ) }}
18
18
{{ $repo := . }}
19
19
{{ range $issueBlocks }}
20
20
< div class ="c-alert " role ="alert " hidden >
Original file line number Diff line number Diff line change @@ -28,13 +28,26 @@ <h2 class="e-heading__4 c-objectives__title is-invisible">
28
28
{{ $prep := .Site.GetPage (printf "%sprep/index.md"
29
29
.CurrentSection.RelPermalink)
30
30
}}
31
- {{ $backlog := .Site.GetPage (printf "%sbacklog/index.md"
31
+ {{ $backlogPage := .Site.GetPage (printf "%sbacklog/index.md"
32
32
.CurrentSection.RelPermalink)
33
33
}}
34
34
{{ $dayplan := .Site.GetPage (printf "%sday-plan/index.md"
35
35
.CurrentSection.RelPermalink)
36
36
}}
37
- {{ $issueBlocks := partial "block/issues-list-as-blocks.html" (dict "backlog" $backlog.Params.backlog "backlog_filter" $backlog.Params.backlog_filter) }}
37
+ {{ $issueBlocks := slice }}
38
+ {{ if $backlogPage }}
39
+ {{ $backlogs := $backlogPage.Params.backlog }}
40
+ {{ if $backlogs }}
41
+ {{ if reflect.IsSlice $backlogs }}
42
+ {{ range $backlogs }}
43
+ {{ $issueBlocks = append (partial "block/issues-list-as-blocks.html" (dict "backlog" . "backlog_filter" $backlogPage.Params.backlog_filter "path" $pageContext.Path)) $issueBlocks }}
44
+ {{ end }}
45
+ {{ else }}
46
+ {{ $backlog := $backlogs }}
47
+ {{ $issueBlocks = append (partial "block/issues-list-as-blocks.html" (dict "backlog" $backlog "backlog_filter" $backlogPage.Params.backlog_filter "path" $pageContext.Path)) $issueBlocks }}
48
+ {{ end }}
49
+ {{ end }}
50
+ {{ end }}
38
51
{{ $blocks := slice }}
39
52
{{/* append non-nil blocks */}}
40
53
{{ range $prep.Params.blocks }}
Original file line number Diff line number Diff line change 11
11
"owner" site.Params.owner
12
12
"repo" .backlog
13
13
}}
14
+ {{ $currentPath := .path }}
14
15
{{ if .backlog_filter }}
15
16
{{ $variables = merge $variables (dict "labels" .backlog_filter) }}
16
17
{{ end }}
53
54
{{ $issueBlocks := slice }}
54
55
{{ with resources.GetRemote "https://api.github.com/graphql" (merge $request (partial "github-auth.html" .)) }}
55
56
{{ with .Content | unmarshal }}
56
- {{ with .data.repository.issues.nodes }}
57
- {{ range sort . "title" "asc" }}
58
- {{ $issueBlocks = $issueBlocks | append (dict "name" .title "src" .url "number" .number "labels" .labels) }}
57
+ {{ if not .data.repository }}
58
+ {{ errorf "GitHub repository %s/%s referenced on %s had no issues" site.Params.owner (index $variables "repo") $currentPath }}
59
+ {{ else }}
60
+ {{ with .data.repository.issues.nodes }}
61
+ {{ range sort . "title" "asc" }}
62
+ {{ $issueBlocks = $issueBlocks | append (dict "name" .title "src" .url "number" .number "labels" .labels) }}
63
+ {{ end }}
59
64
{{ end }}
60
65
{{ end }}
61
66
{{ end }}
You can’t perform that action at this time.
0 commit comments