[go: up one dir, main page]

Skip to content

Add rules converter

What does this MR do and why?

Adds RulesConverter to convert expression AST nodes to JSON

Example:

'$[[ inputs.env ]] == "prod" && $[[ inputs.region ]] == "us"'

RulesConverter transforms the parsed AST into:

{
  "operator": "AND",
  "children": [
    { "operator": "equals", "field": "env", "value": "prod" },
    { "operator": "equals", "field": "region", "value": "us" }
  ]
}

References

#563376

MR Status Description
Input lexeme !206891 (merged) Parse $[[ inputs.X ]] syntax in expressions
Rules converter 👈 You are here Convert expression AST to JSON
Semantic validation In review !209496 Validate input references and circular dependencies, error handlin
GraphQL API In review next, needs: input lexme, rules converter Expose rules with condition trees

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Laura Montemayor

Merge request reports

Loading