MCPcopy Create free account
hub / github.com/cli/cli / legacyJobLogFilenameRegexp

Function legacyJobLogFilenameRegexp

pkg/cmd/run/view/logs.go:272–276  ·  view source on GitHub ↗

A legacy job run log file is a top-level .txt file whose name starts with a negative number which is the ID of the run; e.g., "-2147483648_jobname.txt".

(job shared.Job)

Source from the content-addressed store, hash-verified

270// A legacy job run log file is a top-level .txt file whose name starts with a
271// negative number which is the ID of the run; e.g., "-2147483648_jobname.txt".
272func legacyJobLogFilenameRegexp(job shared.Job) *regexp.Regexp {
273 sanitizedJobName := getJobNameForLogFilename(job.Name)
274 re := fmt.Sprintf(`^-\d+_%s\.txt$`, regexp.QuoteMeta(sanitizedJobName))
275 return regexp.MustCompile(re)
276}
277
278func stepLogFilenameRegexp(job shared.Job, step shared.Step) *regexp.Regexp {
279 sanitizedJobName := getJobNameForLogFilename(job.Name)

Callers 1

getZipLogMapFunction · 0.85

Calls 1

getJobNameForLogFilenameFunction · 0.85

Tested by

no test coverage detected