diff --git a/cmd_run.go b/cmd_run.go index 73cd759e9..88a814af8 100644 --- a/cmd_run.go +++ b/cmd_run.go @@ -26,6 +26,7 @@ type runOptions struct { ShowOrphans bool EpicLabel string Destination string + DebugGraph bool Targets []string //Preview bool @@ -39,6 +40,7 @@ func (opts runOptions) String() string { func runSetupFlags(flags *pflag.FlagSet, opts *runOptions) { flags.BoolVarP(&opts.NoPull, "no-pull", "f", false, "do not pull new issues before runing") flags.BoolVarP(&opts.ShowClosed, "show-closed", "", false, "show closed issues") + flags.BoolVarP(&opts.DebugGraph, "debug-graph", "", false, "debug graph") flags.BoolVarP(&opts.ShowOrphans, "show-orphans", "", false, "show issues not linked to an epic") flags.StringVarP(&opts.EpicLabel, "epic-label", "", "epic", "label used for epics (empty means issues with dependencies but without dependants)") flags.StringVarP(&opts.Destination, "destination", "", "-", "destination ('-' for stdout)") diff --git a/graphviz.go b/graphviz.go index de2ffcdea..7f552a5c5 100644 --- a/graphviz.go +++ b/graphviz.go @@ -11,10 +11,12 @@ import ( func graphviz(issues Issues, opts *runOptions) (string, error) { var ( invisStyle = map[string]string{"style": "invis", "label": escape("")} - //invisStyle = map[string]string{} - weightMap = map[int]bool{} - weights = []int{} + weightMap = map[int]bool{} + weights = []int{} ) + if opts.DebugGraph { + invisStyle = map[string]string{} + } for _, issue := range issues { if issue.Hidden { continue diff --git a/issue.go b/issue.go index efa1007bc..a27c69333 100644 --- a/issue.go +++ b/issue.go @@ -372,7 +372,7 @@ func (issues Issues) prepare() error { isDuplicateRegex, _ = regexp.Compile(`(?i)(duplicates|duplicate|dup of|dup|duplicate of) ([a-z0-9:/_.-]+#[0-9]+|[a-z0-9/_-]*#[0-9]+)`) weightMultiplierRegex, _ = regexp.Compile(`(?i)(depviz.weight_multiplier[:= ]+)([0-9]+)`) baseWeightRegex, _ = regexp.Compile(`(?i)(depviz.base_weight[:= ]+)([0-9]+)`) - hideFromRoadmapRegex, _ = regexp.Compile(`(?i)(depviz.hide_from_roadmap)`) // FIXME: use label + hideFromRoadmapRegex, _ = regexp.Compile(`(?i)(depviz.hide)`) // FIXME: use label ) for _, issue := range issues {