Skip to content

Commit ad41a04

Browse files
committed
Add comment for setContext call
1 parent 66c6bf5 commit ad41a04

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

extensions/ql-vscode/src/mocks/mock-gh-api-server.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export class MockGitHubApiServer extends DisposableObject {
5656
}
5757

5858
this.recorder.start();
59+
// Set a value in the context to track whether we are recording. This allows us to use this to show/hide commands (see package.json)
5960
await commands.executeCommand('setContext', 'codeQLMockGitHubApiServer.recording', true);
6061

6162
await window.showInformationMessage('Recording scenario. To save the scenario, use the "CodeQL Mock GitHub API Server: Save Scenario" command.');
@@ -67,6 +68,7 @@ export class MockGitHubApiServer extends DisposableObject {
6768
return;
6869
}
6970

71+
// Set a value in the context to track whether we are recording. This allows us to use this to show/hide commands (see package.json)
7072
await commands.executeCommand('setContext', 'codeQLMockGitHubApiServer.recording', false);
7173

7274
if (!this.recorder.isRecording) {
@@ -112,6 +114,7 @@ export class MockGitHubApiServer extends DisposableObject {
112114
}
113115

114116
private async stopRecording(): Promise<void> {
117+
// Set a value in the context to track whether we are recording. This allows us to use this to show/hide commands (see package.json)
115118
await commands.executeCommand('setContext', 'codeQLMockGitHubApiServer.recording', false);
116119

117120
await this.recorder.stop();

0 commit comments

Comments
 (0)