@@ -21,6 +21,7 @@ const {
21
21
GITHUB_SERVER_URL ,
22
22
GITHUB_REPOSITORY_OWNER ,
23
23
GITHUB_ACTOR ,
24
+ GITHUB_REPOSITORY ,
24
25
CI_SERVER_URL ,
25
26
CI_PROJECT_ROOT_NAMESPACE ,
26
27
GITLAB_USER_NAME ,
@@ -72,7 +73,7 @@ const groupId = async () => {
72
73
} else if ( ci === 'gitlab' ) {
73
74
rawId = `${ CI_SERVER_URL } /${ CI_PROJECT_ROOT_NAMESPACE } ` ;
74
75
} else if ( ci === 'bitbucket' ) {
75
- rawId = BITBUCKET_WORKSPACE ;
76
+ rawId = `https://bitbucket.com/ ${ BITBUCKET_WORKSPACE } ` ;
76
77
}
77
78
78
79
return await deterministic ( rawId ) ;
@@ -186,6 +187,22 @@ const send = async ({
186
187
if ( ITERATIVE_DO_NOT_TRACK ) return ;
187
188
if ( ! event . user_id || event . user_id === ID_DO_NOT_TRACK ) return ;
188
189
190
+ // Exclude runs from GitHub Codespaces at Iterative
191
+ if ( GITHUB_REPOSITORY . startsWith ( 'iterative/' ) ) return ;
192
+
193
+ // Exclude continuous integration tests and internal projects from analytics
194
+ if (
195
+ [
196
+ 'dc16cd76-71b7-5afa-bf11-e85e02ee1554' , // deterministic("https://github.com/iterative")
197
+ 'b0e229bf-2598-54b7-a3e0-81869cdad579' , // deterministic("https://github.com/iterative-test")
198
+ 'd5aaeca4-fe6a-5c72-8aa7-6dcd65974973' , // deterministic("https://gitlab.com/iterative.ai")
199
+ 'b6df227b-5b3d-5190-a8fa-d272b617ee6c' , // deterministic("https://gitlab.com/iterative-test")
200
+ '2c6415f0-cb5a-5e52-8c81-c5af4f11715d' , // deterministic("https://bitbucket.com/iterative-ai")
201
+ 'c0b86b90-d63c-5fb0-b84d-718d8e15f8d6' // deterministic("https://bitbucket.com/iterative-test")
202
+ ] . includes ( event . group_id )
203
+ )
204
+ return ;
205
+
189
206
const controller = new AbortController ( ) ;
190
207
const id = setTimeout ( ( ) => controller . abort ( ) , 5 * 1000 ) ;
191
208
await fetch ( endpoint , {
0 commit comments