Skip to content

Commit b62b488

Browse files
committed
chore: remove sentry env from code
1 parent 9435e9c commit b62b488

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.env.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# The client ID you received from GitHub for your GitHub App.
21
GITHUB_OAUTH_CLIENT_ID=GITHUB_OAUTH_CLIENT_ID
3-
4-
# The client secret you received from GitHub for your GitHub App.
52
GITHUB_OAUTH_CLIENT_SECRET=GITHUB_OAUTH_CLIENT_SECRET
3+
4+
SENTRY_PUBLIC_KEY=SENTRY_PUBLIC_KEY
5+
SENTRY_PROJECT_ID=SENTRY_PROJECT_ID

src/analytics.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import * as Sentry from '@sentry/browser'
2-
import { IN_PRODUCTION_MODE, VERSION } from 'env'
2+
import { IN_PRODUCTION_MODE, SENTRY, VERSION } from 'env'
33
import { platform } from 'platforms'
44
import { atomicAsyncFunction, forOf } from 'utils/general'
55
import { storageHelper, storageKeys } from 'utils/storageHelper'
66

7-
const PUBLIC_KEY = 'd22ec5c9cc874539a51c78388c12e3b0'
8-
const PROJECT_ID = '1406497'
7+
const { PUBLIC_KEY, PROJECT_ID } = SENTRY
98

109
const MAX_REPORT_COUNT = 10 // prevent error overflow
1110
let countReportedError = 0

src/env.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ export const GITEE_OAUTH = {
99
}
1010

1111
export const VERSION = process.env.VERSION
12+
13+
export const SENTRY = {
14+
PUBLIC_KEY: process.env.SENTRY_PUBLIC_KEY,
15+
PROJECT_ID: process.env.SENTRY_PROJECT_ID,
16+
}

0 commit comments

Comments
 (0)