File tree 3 files changed +20
-18
lines changed
3 files changed +20
-18
lines changed Original file line number Diff line number Diff line change 1
1
import { Provider } from 'shared/api/helpers'
2
2
3
3
import { AmplitudeEventTracker , initAmplitude } from './amplitude/amplitude'
4
+ import { StubbedEventTracker } from './stub'
4
5
5
6
const AMPLITUDE_API_KEY = process . env . REACT_APP_AMPLITUDE_API_KEY
6
7
7
8
export interface EventTracker {
8
9
// Identifies the user this session belongs to.
9
- identify ( userOwnerId : number | string , username : string ) : void
10
+ identify ( userOwnerId : number , username : string ) : void
10
11
11
12
// Add new events as a new overloaded method signature here.
12
13
// Please keep the `eventType`s very generic as we have a limited number of
@@ -28,11 +29,6 @@ export interface EventTracker {
28
29
) : void
29
30
}
30
31
31
- class StubbedEventTracker implements EventTracker {
32
- identify ( _userOwnerId : string | number , _username : string ) : void { }
33
- track ( _eventType : string , _eventProperties : any ) : void { }
34
- }
35
-
36
32
export function initEventTracker ( ) : void {
37
33
// Calls any init functions for EventTracker implementations
38
34
initAmplitude ( )
Original file line number Diff line number Diff line change
1
+ import { EventTracker } from './events'
2
+
3
+ export class StubbedEventTracker implements EventTracker {
4
+ identify ( _userOwnerId : string | number , _username : string ) : void { }
5
+ track ( _eventType : string , _eventProperties : any ) : void { }
6
+ }
Original file line number Diff line number Diff line change @@ -6,18 +6,18 @@ import { Provider } from 'shared/api/helpers'
6
6
export function providerToName ( provider : Provider ) {
7
7
return (
8
8
{
9
- gh : 'Github ' ,
10
- bb : 'BitBucket ' ,
11
- gl : 'Gitlab ' ,
12
- ghe : 'Github Enterprise' ,
13
- gle : 'Gitlab Enterprise' ,
14
- bbs : 'BitBucket Server' ,
15
- github : 'Github ' ,
16
- bitbucket : 'BitBucket ' ,
17
- gitlab : 'Gitlab ' ,
18
- github_enterprise : 'Github Enterprise' ,
19
- gitlab_enterprise : 'Gitlab Enterprise' ,
20
- bitbucket_server : 'BitBucket Server' ,
9
+ gh : 'GitHub ' ,
10
+ bb : 'Bitbucket ' ,
11
+ gl : 'GitLab ' ,
12
+ ghe : 'GitHub Enterprise' ,
13
+ gle : 'GitLab Enterprise' ,
14
+ bbs : 'Bitbucket Server' ,
15
+ github : 'GitHub ' ,
16
+ bitbucket : 'Bitbucket ' ,
17
+ gitlab : 'GitLab ' ,
18
+ github_enterprise : 'GitHub Enterprise' ,
19
+ gitlab_enterprise : 'GitLab Enterprise' ,
20
+ bitbucket_server : 'Bitbucket Server' ,
21
21
} as const
22
22
) [ provider ]
23
23
}
You can’t perform that action at this time.
0 commit comments