MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / gitRefsParam

Function gitRefsParam

projects/openade-module/src/module.ts:200–208  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

198}
199
200function gitRefsParam(value: unknown): OpenADEActionEventCreateRequest["gitRefsBefore"] {
201 if (value === undefined) return undefined
202 const record = asRecord(value)
203 if (typeof record.sha !== "string" || record.sha.length < 1) throw new Error("gitRefsBefore.sha is invalid")
204 return {
205 sha: record.sha,
206 branch: typeof record.branch === "string" ? record.branch : undefined,
207 }
208}
209
210function unrefTimer(timer: ReturnType<typeof setTimeout>): void {
211 ;(timer as { unref?: () => void }).unref?.()

Callers 2

createActionEventParamsFunction · 0.85

Calls 1

asRecordFunction · 0.70

Tested by

no test coverage detected