templates: one Jinja language (hive-template) for the notify router's flows, flows document version 2
A todo node's key and text were hand-expanded `{field}` strings. They are now Jinja templates rendered through the new hive-template crate (minijinja, an unknown variable is an error), and the controller's save check reads the variables the template uses. The flows document is version 2; a version 1 document reads as version 2 with each `{field}` converted to `{{ field }}`, and the next save writes it.
This commit is contained in:
parent
11393bc538
commit
8ef3138863
1 changed files with 306 additions and 91 deletions
|
|
@ -403,7 +403,7 @@ the ends. Pick a node to edit it in the panel beside the canvas:
|
|||
- a **match** lists conditions, each an event field and the value it must equal;
|
||||
- a **todo** says who gets it (the agents an event field names, or one agent, picked from the agents the swarm has),
|
||||
whether it sets or clears a todo, the todo's key, and its text. The key and the
|
||||
text can use `{field}` placeholders;
|
||||
text are Jinja templates over the event's fields, such as `{{ repo }}#{{ number }}`;
|
||||
- a **request_reviewer** names the forge login the router asks to review the
|
||||
pull request. It ends a branch, like a todo, and the row of kinds above the
|
||||
canvas only offers it when the controller does.
|
||||
|
|
|
|||
Loading…
Reference in a new issue