diff --git a/app/src/lib/stats/stats-store.ts b/app/src/lib/stats/stats-store.ts index f8dc26b405..522f77f122 100644 --- a/app/src/lib/stats/stats-store.ts +++ b/app/src/lib/stats/stats-store.ts @@ -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, + } + : {}), } } diff --git a/app/src/lib/trampoline/use-external-credential-helper.ts b/app/src/lib/trampoline/use-external-credential-helper.ts index 9a2620f5b6..aaee7b92e1 100644 --- a/app/src/lib/trampoline/use-external-credential-helper.ts +++ b/app/src/lib/trampoline/use-external-credential-helper.ts @@ -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() &&