From b210695e5e092635f4db9600fc7f346281681247 Mon Sep 17 00:00:00 2001 From: Shawn Hurley Date: Fri, 11 Oct 2024 09:57:14 -0400 Subject: [PATCH] Adding internal template context value for dependency This is to allow us to know when the java.dependency (or other dependency capabilities) are called. This will allow kai to know when the incident is targeting dependencies and will allow it to pass to the correct task_runner. Signed-off-by: Shawn Hurley --- provider/provider.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/provider/provider.go b/provider/provider.go index 6dbdb507..533c0244 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -678,9 +678,10 @@ func (dc DependencyCondition) Evaluate(ctx context.Context, log logr.Logger, con incident := engine.IncidentContext{ FileURI: matchedDep.uri, Variables: map[string]interface{}{ - "name": matchedDep.dep.Name, - "version": matchedDep.dep.Version, - "type": matchedDep.dep.Type, + "name": matchedDep.dep.Name, + "version": matchedDep.dep.Version, + "type": matchedDep.dep.Type, + "konveyor.io/internal/dependency-rule": true, }, } if depLocationResolver != nil {