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

Function legacyJobLogFilenameRegexp

pkg/cmd/run/view/logs.go:274–278  ·  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

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

Callers 1

getZipLogMapFunction · 0.85

Calls 1

getJobNameForLogFilenameFunction · 0.85

Tested by

no test coverage detected