Skip to content

Commit e52da17

Browse files
committed
Fix lint for pinnedWorkflows.ts
1 parent 9e2b12a commit e52da17

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

src/extension.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ export async function activate(context: vscode.ExtensionContext) {
4040
initResources(context);
4141

4242
initConfiguration(context);
43-
await initPinnedWorkflows(context);
43+
await initPinnedWorkflows();
4444

4545
// Track workflow
46-
initWorkflowDocumentTracking(context);
46+
await initWorkflowDocumentTracking(context);
4747

48-
//
4948
// Tree views
50-
//
5149

5250
const workflowTreeProvider = new WorkflowsTreeProvider();
5351
context.subscriptions.push(vscode.window.registerTreeDataProvider("github-actions.workflows", workflowTreeProvider));
@@ -143,7 +141,7 @@ export async function activate(context: vscode.ExtensionContext) {
143141

144142
// Editing features
145143

146-
init(context);
144+
await init(context);
147145

148146
log("...initialized");
149147
}

src/pinnedWorkflows/pinnedWorkflows.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ interface PinnedWorkflow {
2525
}
2626

2727
const pinnedWorkflows: PinnedWorkflow[] = [];
28-
let refreshTimer: /*NodeJS.Timeout*/ any | undefined;
28+
let refreshTimer: NodeJS.Timeout | undefined;
2929

30-
export async function initPinnedWorkflows(context: vscode.ExtensionContext) {
30+
export async function initPinnedWorkflows() {
3131
// Register handler for configuration changes
32-
onPinnedWorkflowsChange(_init);
32+
onPinnedWorkflowsChange(() => _init);
3333

3434
await _init();
3535
}
@@ -42,7 +42,7 @@ async function _init() {
4242
refreshTimer = undefined;
4343
}
4444
if (isPinnedWorkflowsRefreshEnabled()) {
45-
refreshTimer = setInterval(refreshPinnedWorkflows, pinnedWorkflowsRefreshInterval() * 1000);
45+
refreshTimer = setInterval(() => refreshPinnedWorkflows, pinnedWorkflowsRefreshInterval() * 1000);
4646
}
4747
}
4848

@@ -136,7 +136,7 @@ async function updatePinnedWorkflow(pinnedWorkflow: PinnedWorkflow) {
136136
const runs = await gitHubRepoContext.client.actions.listWorkflowRuns({
137137
owner: gitHubRepoContext.owner,
138138
repo: gitHubRepoContext.name,
139-
workflow_id: pinnedWorkflow.workflowId as any, // Workflow can also be a file name
139+
workflow_id: pinnedWorkflow.workflowId, // Workflow can also be a file name
140140
per_page: 1,
141141
});
142142
const { total_count, workflow_runs } = runs.data;

0 commit comments

Comments
 (0)