Skip to content

Commit

Permalink
feat: add 'run --no-compress'
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Sep 24, 2018
1 parent f6d4cbe commit b45e187
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cmd_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type runOptions struct {
EpicLabel string
Destination string
DebugGraph bool
NoCompress bool

Targets []string
//Preview bool
Expand All @@ -44,6 +45,7 @@ func runSetupFlags(flags *pflag.FlagSet, opts *runOptions) {
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.BoolVarP(&opts.NoCompress, "no-compress", "", false, "do not compress graph (no overlap)")
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)")
flags.StringSliceVarP(&opts.AdditionalPulls, "additional-pull", "", []string{}, "additional pull that won't necessarily be displayed on the graph")
Expand Down
5 changes: 4 additions & 1 deletion graphviz.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func graphviz(issues Issues, opts *runOptions) (string, error) {
panicIfErr(g.SetName("G"))
attrs := map[string]string{}
attrs["truecolor"] = "true"
attrs["overlap"] = "compress"
attrs["sep"] = "-0.7"
attrs["compound"] = "true"
attrs["splines"] = "true"
Expand All @@ -51,6 +50,10 @@ func graphviz(issues Issues, opts *runOptions) (string, error) {
attrs["margin"] = "0.2"
attrs["center"] = "true"
attrs["constraint"] = "false"
if !opts.NoCompress {
attrs["overlap"] = "compress"
}

for k, v := range attrs {
panicIfErr(g.AddAttr("G", k, v))
}
Expand Down

0 comments on commit b45e187

Please sign in to comment.