From 486842e3eb569db3182da0a3d98e9de53f65eb1a 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/provider/provider.go b/provider/provider.go index 6dbdb507..fc1be949 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -740,8 +740,9 @@ 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, + "name": matchedDep.dep.Name, + "version": matchedDep.dep.Version, + "konveyor.io/internal/dependency-rule": true, }, } if depLocationResolver != nil {