File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -429,3 +429,23 @@ const LIVE_RESULTS = new Setting('liveResults', REMOTE_QUERIES_SETTING);
429429export function isVariantAnalysisLiveResultsEnabled ( ) : boolean {
430430 return ! ! LIVE_RESULTS . getValue < boolean > ( ) ;
431431}
432+
433+ /**
434+ * A flag indicating whether to enable a mock GitHub API server.
435+ */
436+ const MOCK_GH_API_SERVER = new Setting ( 'mockGitHubApiServer' , REMOTE_QUERIES_SETTING ) ;
437+
438+ export interface MockGitHubApiConfig {
439+ mockServerEnabled : boolean ;
440+ onDidChangeConfiguration : Event < void > ;
441+ }
442+
443+ export class MockGitHubApiConfigListener extends ConfigListener implements MockGitHubApiConfig {
444+ protected handleDidChangeConfiguration ( e : ConfigurationChangeEvent ) : void {
445+ this . handleDidChangeConfigurationForRelevantSettings ( [ MOCK_GH_API_SERVER ] , e ) ;
446+ }
447+
448+ public get mockServerEnabled ( ) : boolean {
449+ return ! ! MOCK_GH_API_SERVER . getValue < boolean > ( ) ;
450+ }
451+ }
You can’t perform that action at this time.
0 commit comments