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

Function ComputeFrontmatterHashFromFile

pkg/parser/frontmatter_hash.go:140–142  ·  view source on GitHub ↗

ComputeFrontmatterHashFromFile computes the frontmatter hash for a workflow file using text-based approach (no YAML parsing) to match JavaScript implementation

(filePath string, cache *ImportCache)

Source from the content-addressed store, hash-verified

138// ComputeFrontmatterHashFromFile computes the frontmatter hash for a workflow file
139// using text-based approach (no YAML parsing) to match JavaScript implementation
140func ComputeFrontmatterHashFromFile(filePath string, cache *ImportCache) (string, error) {
141 return ComputeFrontmatterHashFromFileWithReader(filePath, cache, DefaultFileReader)
142}
143
144// ComputeFrontmatterHashFromFileWithParsedFrontmatter computes the frontmatter hash using
145// a pre-parsed frontmatter map. The parsedFrontmatter must not be nil; callers are responsible