(url: string)
| 20 | |
| 21 | // fetcher passed to useSWR() to get webhook data using the given URL |
| 22 | async 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. |
nothing calls this directly
no outgoing calls
no test coverage detected