Add settings view

Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
Sanjula Ganepola
2024-09-29 11:28:03 -04:00
parent f47327dd23
commit b30fc76de5
11 changed files with 178 additions and 10 deletions

View File

@@ -1,5 +1,7 @@
import { ThemeIcon, TreeItem, TreeItemCollapsibleState } from "vscode";
import { act } from "../../extension";
import { GithubLocalActionsTreeItem } from "../githubLocalActionsTreeItem";
import VariableTreeItem from "./variable";
export default class VariablesTreeItem extends TreeItem implements GithubLocalActionsTreeItem {
static contextValue = 'githubLocalActions.variables';
@@ -11,6 +13,8 @@ export default class VariablesTreeItem extends TreeItem implements GithubLocalAc
}
async getChildren(): Promise<GithubLocalActionsTreeItem[]> {
return [];
const workflows = await act.workflowsManager.getWorkflows();
const variables = [...new Set(workflows.map(workflow => act.settingsManager.getVariables(workflow)).flat())];
return variables.map(variable => new VariableTreeItem(variable));
}
}