Преглед изворни кода

feature: Add OT_ vars to each execution (#406)

James Read пре 1 година
родитељ
комит
76c9171356
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      internal/executor/executor.go

+ 3 - 0
internal/executor/executor.go

@@ -332,6 +332,9 @@ func stepACLCheck(req *ExecutionRequest) bool {
 func stepParseArgs(req *ExecutionRequest) bool {
 	var err error
 
+	req.Arguments["ot_executionTrackingId"] = req.TrackingID
+	req.Arguments["ot_username"] = req.AuthenticatedUser.Username
+
 	req.finalParsedCommand, err = parseActionArguments(req.Action.Shell, req.Arguments, req.Action, req.logEntry.ActionTitle, req.EntityPrefix)
 
 	if err != nil {