From ac380bb42ac03f86271e65cd03d493c5a3ce89f9 Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Wed, 12 Sep 2018 02:07:24 +0200 Subject: [PATCH] chore: avoid showing nodes without epics --- graphviz.go | 1 + issue.go | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/graphviz.go b/graphviz.go index ce77bb893..58402c3d7 100644 --- a/graphviz.go +++ b/graphviz.go @@ -66,6 +66,7 @@ func roadmapGraph(issues Issues, opts *renderOptions) (string, error) { } if !opts.ShowOrphans { issues.HideOrphans() + issues.HideEpicLess() } issues.processEpicLinks() diff --git a/issue.go b/issue.go index 7beb967cb..99f14f1c7 100644 --- a/issue.go +++ b/issue.go @@ -468,3 +468,12 @@ func (issues Issues) HideOrphans() { } } } + +func (issues Issues) HideEpicLess() { + for _, issue := range issues { + if !issue.LinkedWithEpic { + issue.Hidden = true + } + } + issues.processEpicLinks() +}