Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 1254333

Browse files
authored
React to updated octokit
1 parent 5a7ef4a commit 1254333

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type OctokitRepoData<
3737

3838
export type Workflow = OctokitData<"listRepoWorkflows", "workflows">;
3939
export type WorkflowRun = OctokitData<"listWorkflowRuns", "workflow_runs"> & {
40-
conclusion: string;
40+
conclusion: string | null;
4141
};
4242

4343
export type WorkflowJob = OctokitData<"listJobsForWorkflowRun", "jobs">;

src/treeViews/icons.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export function initResources(context: vscode.ExtensionContext) {
66
}
77

88
export interface IStatusAndConclusion {
9-
status: string;
10-
conclusion: string;
9+
status: string | null;
10+
conclusion: string | null;
1111
}
1212

1313
export function getAbsoluteIconPath(relativeIconPath: string): {

src/treeViews/workflows/workflowJobNode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ export class WorkflowJobNode extends vscode.TreeItem {
2626
}
2727

2828
hasSteps(): boolean {
29-
return this.job.steps && this.job.steps.length > 0;
29+
return !!(this.job.steps && this.job.steps.length > 0);
3030
}
3131

3232
async getSteps(): Promise<WorkflowStepNode[]> {
33-
return this.job.steps.map(
33+
return (this.job.steps || []).map(
3434
(s) => new WorkflowStepNode(this.gitHubRepoContext, this.job, s)
3535
);
3636
}

0 commit comments

Comments
 (0)