Skip to content

Commit

Permalink
Adding internal template context value for dependency
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
shawn-hurley committed Oct 11, 2024
1 parent 974a5d2 commit a4bc93c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,9 @@ func (dc DependencyCondition) Evaluate(ctx context.Context, log logr.Logger, con
resp.Incidents = append(resp.Incidents, incident)
// For now, lets leave this TODO to figure out what we should be setting in the context
resp.TemplateContext = 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,
}
continue
}
Expand Down

0 comments on commit a4bc93c

Please sign in to comment.