MCPcopy Index your code
hub / github.com/github/docs / getWebhooks

Function getWebhooks

src/webhooks/lib/index.js:62–76  ·  view source on GitHub ↗
(version)

Source from the content-addressed store, hash-verified

60
61// returns all the webhook data for the given version
62export async function getWebhooks(version) {
63 const openApiVersion = getOpenApiVersion(version)
64 if (!webhooksCache.has(openApiVersion)) {
65 const filename = `${openApiVersion}.json`
66
67 // The `readCompressedJsonFileFallback()` function
68 // will check for both a .br and .json extension.
69 webhooksCache.set(
70 openApiVersion,
71 readCompressedJsonFileFallback(path.join(schemasPath, filename))
72 )
73 }
74
75 return webhooksCache.get(openApiVersion)
76}
77
78function getOpenApiVersion(version) {
79 if (!(version in allVersions)) {

Callers 3

webhooks.jsFile · 0.90
getInitialPageWebhooksFunction · 0.70
getWebhookFunction · 0.70

Calls 2

getOpenApiVersionFunction · 0.70

Tested by

no test coverage detected