MCPcopy Create free account
hub / github.com/github/docs / webhookFetcher

Function webhookFetcher

components/webhooks/Webhook.tsx:22–29  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

20
21// fetcher passed to useSWR() to get webhook data using the given URL
22async function webhookFetcher(url: string) {
23 const response = await fetch(url)
24 if (!response.ok) {
25 throw new Error(`${response.status} on ${url}`)
26 }
27
28 return response.json()
29}
30
31// We manually created decorated webhooks files for GHES versions older than
32// 3.7, returns whether the given version is one of these versions of GHES.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected