1
0
mirror of https://github.com/desktop/desktop synced 2024-06-30 22:54:41 +00:00

Merge pull request #18888 from desktop/track-gcm-usage

Track user credential helper preference
This commit is contained in:
Markus Olsson 2024-06-25 12:46:07 +02:00 committed by GitHub
commit c49e081d67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 1 deletions

View File

@ -34,6 +34,8 @@ import { getNotificationsEnabled } from '../stores/notifications-store'
import { isInApplicationFolder } from '../../ui/main-process-proxy'
import { getRendererGUID } from '../get-renderer-guid'
import { ValidNotificationPullRequestReviewState } from '../valid-notification-pull-request-review'
import { useExternalCredentialHelperKey } from '../trampoline/use-external-credential-helper'
import { enableExternalCredentialHelper } from '../feature-flag'
type PullRequestReviewStatFieldInfix =
| 'Approved'
@ -398,6 +400,12 @@ interface ICalculatedStats {
/** Whether or not the user has their accessibility setting set for viewing diff check marks */
readonly diffCheckMarksVisible: boolean
/**
* Whether or not the user has enabled the external credential helper or null
* if the user has not yet made an active decision
**/
readonly useExternalCredentialHelper?: boolean | null
}
type DailyStats = ICalculatedStats &
@ -605,6 +613,12 @@ export class StatsStore implements IStatsStore {
launchedFromApplicationsFolder,
linkUnderlinesVisible,
diffCheckMarksVisible,
...(enableExternalCredentialHelper()
? {
useExternalCredentialHelper:
getBoolean(useExternalCredentialHelperKey) ?? null,
}
: {}),
}
}

View File

@ -2,7 +2,8 @@ import { enableExternalCredentialHelper } from '../feature-flag'
import { getBoolean, setBoolean } from '../local-storage'
export const useExternalCredentialHelperDefault = false
const useExternalCredentialHelperKey: string = 'useExternalCredentialHelper'
export const useExternalCredentialHelperKey: string =
'useExternalCredentialHelper'
export const useExternalCredentialHelper = () =>
enableExternalCredentialHelper() &&