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 b210695
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b210695

Please sign in to comment.