MCPcopy Create free account
hub / github.com/github/gh-aw / readLockFileFromHEAD

Method readLockFileFromHEAD

pkg/workflow/compiler.go:392–397  ·  view source on GitHub ↗

readLockFileFromHEAD reads a lock file from git HEAD using the compiler's cached git root directory, avoiding the overhead of spawning a subprocess to re-discover the repository root on every call.

(lockFile string)

Source from the content-addressed store, hash-verified

390// git root directory, avoiding the overhead of spawning a subprocess to re-discover
391// the repository root on every call.
392func (c *Compiler) readLockFileFromHEAD(lockFile string) (string, error) {
393 if c.gitRoot == "" {
394 return "", errors.New("git root not available (not in a git repository or git not installed)")
395 }
396 return gitutil.ReadFileFromHEAD(lockFile, c.gitRoot)
397}
398
399// CompileWorkflowData compiles pre-parsed workflow content into GitHub Actions YAML.
400// Unlike CompileWorkflow, this accepts already-parsed frontmatter and markdown content

Callers 2

CompileWorkflowDataMethod · 0.95

Calls 1

ReadFileFromHEADFunction · 0.92

Tested by 1