-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace relying on variables to generate new templating #1205
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1205 +/- ##
=======================================
Coverage 87.72% 87.72%
=======================================
Files 260 260
Lines 10870 10870
=======================================
Hits 9536 9536
Misses 915 915
Partials 419 419 ☔ View full report in Codecov by Sentry. |
0548d41
to
ecf7ab0
Compare
ecf7ab0
to
abcf3dd
Compare
@@ -122,7 +122,18 @@ func (a *SendMsgAction) Execute(run flows.Run, step flows.Step, logModifier flow | |||
} | |||
|
|||
evaluatedText = translation.Substitute(evaluatedVariables) | |||
templating = flows.NewMsgTemplating(a.Templating.Template, evaluatedVariables, translation.Namespace()) | |||
|
|||
params := make(map[string][]flows.TemplateParam, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just moved building the params here and pass that to the flows.NewMsgTemplating instead of passing a list of variables
params := make(map[string][]flows.TemplateParam, 1) | ||
|
||
// TODO add support for params in other components besides body | ||
if len(evaluatedVariables) > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here is the right place since we can have access to the param types in the template translations once we support other components and parameter types
No description provided.