File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import * as cp from 'child_process';
77import * as fs from 'fs' ;
88import * as path from 'path' ;
99import * as util from 'util' ;
10+ import { URL } from 'url' ;
1011import { getStateConfig } from '../goSurvey' ;
1112import { getBinPath } from '../util' ;
1213import { updateGlobalState } from '../stateUtils' ;
@@ -100,6 +101,13 @@ export async function getLatestDeveloperSurvey(now: Date): Promise<DeveloperSurv
100101 lastDateUpdated : now
101102 } ;
102103
104+ // The survey URL stored in config.json is the raw survey URL. We add the
105+ // s=v (for vscode) query parameter to identify the source of the survey
106+ // respondent.
107+ const url = new URL ( config . URL ) ;
108+ url . searchParams . append ( 's' , 'v' ) ;
109+ config . URL = url . toString ( ) ;
110+
103111 updateGlobalState ( DEVELOPER_SURVEY_CONFIG_STATE_KEY , JSON . stringify ( newState ) ) ;
104112
105113 outputChannel . info ( `Using fetched Go developer survey: ${ newState . version } ` ) ;
Original file line number Diff line number Diff line change @@ -112,13 +112,13 @@ suite('developer survey tests', () => {
112112 const oldConfig : config . DeveloperSurveyConfig = {
113113 StartDate : new Date ( '2025-07-01T00:00:00Z' ) ,
114114 EndDate : new Date ( '2025-08-01T00:00:00Z' ) ,
115- URL : 'https://google.com/survey/old'
115+ URL : 'https://google.com/survey/old?s=v '
116116 } ;
117117
118118 const newConfig = {
119119 StartDate : new Date ( '2025-09-01T00:00:00Z' ) ,
120120 EndDate : new Date ( '2025-10-01T00:00:00Z' ) ,
121- URL : 'https://google.com/survey/new'
121+ URL : 'https://google.com/survey/new?s=v '
122122 } ;
123123
124124 // old state, now, module survey config => return survey config
You can’t perform that action at this time.
0 commit comments