From 0cd0d4fbbc1747e3621d1a17de734ba0f8490ffc Mon Sep 17 00:00:00 2001 From: Liz Kammer Date: Tue, 3 May 2022 10:49:10 -0400 Subject: [PATCH] Add info to json module graph about CreateModule Blueprint already stores the module that called CreateModule, let's surface it. Test: m json-module-graph and view results Change-Id: Ie67bf8e431d764eb23727c90200f57c9de4ab053 --- context.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/context.go b/context.go index 6496948..814fdce 100644 --- a/context.go +++ b/context.go @@ -2253,6 +2253,7 @@ type JsonModule struct { Deps []jsonDep Type string Blueprint string + CreatedBy *string Module map[string]interface{} } @@ -2290,6 +2291,10 @@ func jsonModuleFromModuleInfo(m *moduleInfo) *JsonModule { Blueprint: m.relBlueprintsFile, Module: make(map[string]interface{}), } + if m.createdBy != nil { + n := m.createdBy.Name() + result.CreatedBy = &n + } if j, ok := m.logicModule.(JSONDataSupplier); ok { j.AddJSONData(&result.Module) }