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

Function isScrapedGhesVersion

components/webhooks/Webhook.tsx:36–46  ·  view source on GitHub ↗
(version: ReturnType<typeof useVersion>)

Source from the content-addressed store, hash-verified

34// TODO: once 3.7 is the oldest supported version of GHES, we won't need this
35// anymore.
36function isScrapedGhesVersion(version: ReturnType<typeof useVersion>) {
37 const scrapedVersions = ['3.6', '3.5', '3.4', '3.3', '3.2']
38
39 if (!version.isEnterprise) return false
40
41 // getting the number part e.g. '3.6' from a version string like
42 // 'enterprise-server@3.6'
43 const versionNumber = version.currentVersion.split('@')[1]
44
45 return scrapedVersions.includes(versionNumber)
46}
47
48export function Webhook({ webhook }: Props) {
49 // Get version for requests to switch webhook action type

Callers 1

WebhookFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected