MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / readProjectHooks

Function readProjectHooks

src/config/settings.ts:106–110  ·  view source on GitHub ↗

Normalized project hooks (known events only), or undefined if none.

(cwd: string)

Source from the content-addressed store, hash-verified

104
105/** Normalized project hooks (known events only), or undefined if none. */
106function readProjectHooks(cwd: string): HooksConfig | undefined {
107 const merged: HooksConfig = {}
108 mergeHooksInto(merged, readJson(getProjectSettingsPath(cwd))?.hooks)
109 return Object.keys(merged).length > 0 ? merged : undefined
110}
111
112function hashHooks(hooks: HooksConfig): string {
113 return crypto.createHash("sha256").update(JSON.stringify(hooks)).digest("hex").slice(0, 16)

Callers 3

trustProjectHooksFunction · 0.85
getPendingProjectHooksFunction · 0.85
loadSettingsFunction · 0.85

Calls 3

mergeHooksIntoFunction · 0.85
getProjectSettingsPathFunction · 0.85
readJsonFunction · 0.70

Tested by

no test coverage detected