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

Function jobLogFilenameRegexp

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

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

Callers 1

getZipLogMapFunction · 0.85

Calls 1

getJobNameForLogFilenameFunction · 0.85

Tested by

no test coverage detected