Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions actionsdotnetactcompat/act_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ func (f *ghaFormatter) Format(entry *logrus.Entry) ([]byte, error) {
if f.rqt.MaskHints != nil {
for _, v := range f.rqt.MaskHints {
if strings.EqualFold(v.Type, "regex") {
r, _ := regexp.Compile(v.Value)
r, err := regexp.Compile(v.Value)
if err != nil {
// TODO precompile regex and log errors
continue
}
msg = r.ReplaceAllString(msg, "***")
}
}
Expand Down Expand Up @@ -244,7 +248,11 @@ func ExecWorker(rqt *protocol.AgentJobRequestMessage, wc actionsrunner.WorkerCon
}
actLogger.SetFormatter(formatter)
actLogger.Println("Initialize translating the job request to actions-oss/act-cli (nektos/act)")
vssConnection, vssConnectionData, _ := rqt.GetConnection("SystemVssConnection")
vssConnection, vssConnectionData, conErr := rqt.GetConnection("SystemVssConnection")
if conErr != nil {
wc.FailInitJob("Failed to initialize Job", conErr.Error())
return
}
if jlogger.Connection != nil {
vssConnection.Client = jlogger.Connection.Client
vssConnection.Trace = jlogger.Connection.Trace
Expand Down Expand Up @@ -334,8 +342,10 @@ func ExecWorker(rqt *protocol.AgentJobRequestMessage, wc actionsrunner.WorkerCon
return
}
var payload string
{
e, _ := json.Marshal(githubCtxMap["event"])
if e, eventErr := json.Marshal(githubCtxMap["event"]); eventErr != nil {
failInitJob(fmt.Sprintf("cannot convert github.event to json: %s", eventErr.Error()))
return
} else {
payload = string(e)
}
unixHostPrefix := "unix://"
Expand Down
Loading