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

Function jobLogFilenameRegexp

pkg/cmd/run/view/logs.go:264–268  ·  view source on GitHub ↗

A job run log file is a top-level .txt file whose name starts with an ordinal number; e.g., "0_jobname.txt".

(job shared.Job)

Source from the content-addressed store, hash-verified

262// A job run log file is a top-level .txt file whose name starts with an ordinal
263// number; e.g., "0_jobname.txt".
264func jobLogFilenameRegexp(job shared.Job) *regexp.Regexp {
265 sanitizedJobName := getJobNameForLogFilename(job.Name)
266 re := fmt.Sprintf(`^\d+_%s\.txt$`, regexp.QuoteMeta(sanitizedJobName))
267 return regexp.MustCompile(re)
268}
269
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".

Callers 1

getZipLogMapFunction · 0.85

Calls 1

getJobNameForLogFilenameFunction · 0.85

Tested by

no test coverage detected