MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / handleFileChange

Method handleFileChange

internal/prd/watcher.go:128–140  ·  view source on GitHub ↗

handleFileChange loads the PRD and sends an event if it changed.

()

Source from the content-addressed store, hash-verified

126
127// handleFileChange loads the PRD and sends an event if it changed.
128func (w *Watcher) handleFileChange() {
129 prd, err := LoadPRD(w.path)
130 if err != nil {
131 w.events <- WatcherEvent{Error: err}
132 return
133 }
134
135 // Check if any story status changed
136 if w.hasStatusChanged(prd) {
137 w.lastPRD = prd
138 w.events <- WatcherEvent{PRD: prd}
139 }
140}
141
142// hasStatusChanged returns true if any story's inProgress or passes field changed.
143func (w *Watcher) hasStatusChanged(newPRD *PRD) bool {

Callers 1

processEventsMethod · 0.95

Calls 2

hasStatusChangedMethod · 0.95
LoadPRDFunction · 0.85

Tested by

no test coverage detected