Skip to content

Commit 735fe4e

Browse files
committed
[release] src/goDeveloperSurvey: prepare 2022 mid dev survey
- Use UTC - Use lower probability - Include go version and gopls setting info Responders of the last year dev survey may be prompted again. Change-Id: I994a2c2b482960217e5712f936349fcc6fa351be Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/404074 Run-TryBot: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Jamal Carvalho <[email protected]> Reviewed-by: Todd Kulesza <[email protected]> (cherry picked from commit 43bc5f9) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/407874 TryBot-Result: kokoro <[email protected]>
1 parent b31fd41 commit 735fe4e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/goDeveloperSurvey.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ import vscode = require('vscode');
1010
import { getGoConfig } from './config';
1111
import { lastUserAction } from './language/goLanguageServer';
1212
import { daysBetween, flushSurveyConfig, getStateConfig, minutesBetween, timeMinute } from './goSurvey';
13+
import { getGoVersion } from './util';
1314

1415
// Start and end dates of the survey.
15-
export const startDate = new Date('2021-10-27');
16-
export const endDate = new Date('2021-11-16');
16+
export const startDate = new Date('May 31 2022 00:00:00 GMT');
17+
export const endDate = new Date('June 21 2022 00:00:00 GMT');
1718

1819
// DeveloperSurveyConfig is the set of global properties used to determine if
1920
// we should prompt a user to take the gopls survey.
@@ -86,7 +87,7 @@ export function shouldPromptForSurvey(now: Date, cfg: DeveloperSurveyConfig): De
8687
// is done by generating a random number in the range [0, 1) and checking
8788
// if it is < probability.
8889
if (cfg.prompt === undefined) {
89-
const probability = 0.2;
90+
const probability = 0.1;
9091
cfg.datePromptComputed = now;
9192
cfg.prompt = Math.random() < probability;
9293
}
@@ -140,7 +141,10 @@ by participating in this 10-minute survey before ${endDate.toDateString()}?`,
140141
{
141142
cfg.lastDateAccepted = now;
142143
cfg.prompt = true;
143-
const surveyURL = 'https://google.qualtrics.com/jfe/form/SV_0BwHwKSaeE9Cx2S?s=p';
144+
const goV = await getGoVersion();
145+
const goVersion = goV ? goV.format(true) : 'na';
146+
const useGopls = getGoConfig()?.get('useLanguageServer') === true ? 'true' : 'false';
147+
const surveyURL = `https://google.qualtrics.com/jfe/form/SV_7O3x4IZKiUn0QCO?s=p&go=${goVersion}&gopls=${useGopls}`;
144148
await vscode.env.openExternal(vscode.Uri.parse(surveyURL));
145149
}
146150
break;

0 commit comments

Comments
 (0)