src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.ts/RunAutomaticTasks/promptForPermission
class RunAutomaticTasks:	public static async promptForPermission(taskService: ITaskService, storageService: IStorageService, notificationService: INotificationService, workspaceTrustManagementService: IWorkspaceTrustManagementService,
		openerService: IOpenerService, workspaceTaskResult: Map<string, IWorkspaceFolderTaskResult>) {
		const isWorkspaceTrusted = workspaceTrustManagementService.isWorkspaceTrusted;
		if (!isWorkspaceTrusted) {
			return;
		}

		const isFolderAutomaticAllowed = storageService.getBoolean(ARE_AUTOMATIC_TASKS_ALLOWED_IN_WORKSPACE, StorageScope.WORKSPACE, undefined);
		if (isFolderAutomaticAllowed !== undefined) {
			return;
		}

		const { tasks, taskNames, locations } = RunAutomaticTasks._findAutoTasks(taskService, workspaceTaskResult);
		if (taskNames.length > 0) {
			// We have automatic tasks, prompt to allow.
			this._showPrompt(notificationService, storageService, taskService, openerService, taskNames, locations).then(allow => {
				if (allow) {
					RunAutomaticTasks._runTasks(taskService, tasks);
				}
			});
		}
	}