1
0
mirror of synced 2026-01-07 09:01:31 -05:00

Merge pull request #33587 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2024-06-19 13:29:08 -07:00
committed by GitHub
4 changed files with 3 additions and 11 deletions

View File

@@ -7,7 +7,7 @@ import useSWR from 'swr'
import { useTranslation } from 'src/languages/components/useTranslation'
import { Link } from 'src/frame/components/Link'
import { sendEvent, EventType, startVisitTime } from 'src/events/components/events'
import { sendEvent, EventType } from 'src/events/components/events'
import styles from './Survey.module.scss'
@@ -324,7 +324,6 @@ function trackEvent(eventData: EventData) {
survey_vote: eventData.vote,
survey_comment: eventData.comment || undefined,
survey_email: eventData.email || undefined,
survey_visit_duration: (Date.now() - startVisitTime) / 1000,
survey_rating: eventData.rating,
})
}

View File

@@ -6,7 +6,7 @@ import { isLoggedIn } from 'src/frame/components/hooks/useHasAccount'
const COOKIE_NAME = '_docs-events'
export const startVisitTime = Date.now()
const startVisitTime = Date.now()
let initialized = false
let cookieValue: string | undefined
@@ -119,7 +119,6 @@ type SendEventProps = {
survey_vote: boolean
survey_comment?: string
survey_email?: string
survey_visit_duration?: number
survey_rating?: number
}
}

View File

@@ -389,12 +389,6 @@ const survey = {
format: 'email',
description: "The user's email address, if the user provided and consented.",
},
survey_visit_duration: {
type: 'number',
minimum: 0.001,
description:
'The duration of survey submission - page.timestamp, in seconds. Used to filter out bot-generated survey resopnses.',
},
survey_rating: {
type: 'number',
description:

View File

@@ -52,7 +52,7 @@ async function main() {
throw new Error('The public-docs.yml file being synced does not have a valid schema')
}
await writeFile(SECRET_SCANNING_FILEPATH, yaml.dump(data))
await writeFile(SECRET_SCANNING_FILEPATH, yaml.dump(yamlData))
// update the config file with the latest sha
const configFilepath = 'src/secret-scanning/lib/config.json'