@@ -3,18 +3,18 @@ import * as vscode from "vscode";
33import { getCurrentBranch , getGitHubContext , GitHubRepoContext } from "../git/repository" ;
44import { CurrentBranchRepoNode } from "./current-branch/currentBranchRepoNode" ;
55
6+ import { NoRunForBranchNode } from "./current-branch/noRunForBranchNode" ;
67import { log , logDebug } from "../log" ;
78import { RunStore } from "../store/store" ;
89import { AttemptNode } from "./shared/attemptNode" ;
10+ import { NoInternetConnectivityNode } from "./shared/noInternetConnectivityNode" ;
11+ import { NoWorkflowJobsNode } from "./shared/noWorkflowJobsNode" ;
912import { PreviousAttemptsNode } from "./shared/previousAttemptsNode" ;
1013import { WorkflowJobNode } from "./shared/workflowJobNode" ;
1114import { WorkflowRunNode } from "./shared/workflowRunNode" ;
1215import { WorkflowRunTreeDataProvider } from "./workflowRunTreeDataProvider" ;
13- import { NoInternetConnectivityNode } from "./shared/noInternetConnectivityNode" ;
14- import { hasInternetConnectivity } from "../util" ;
15- import { NoRunForBranchNode } from "./current-branch/noRunForBranchNode" ;
16- import { NoWorkflowJobsNode } from "./shared/noWorkflowJobsNode" ;
1716import { WorkflowStepNode } from "./workflows/workflowStepNode" ;
17+ import { canReachGitHubAPI } from "../util" ;
1818
1919type CurrentBranchTreeNode =
2020 | CurrentBranchRepoNode
@@ -43,8 +43,8 @@ export class CurrentBranchTreeProvider
4343 }
4444
4545 async refresh ( ) : Promise < void > {
46- // Don't delete all the nodes if we don 't have internet connectivity
47- if ( await hasInternetConnectivity ( ) ) {
46+ // Don't delete all the nodes if we can 't reach GitHub API
47+ if ( await canReachGitHubAPI ( ) ) {
4848 this . _onDidChangeTreeData . fire ( null ) ;
4949 } else {
5050 await vscode . window . showWarningMessage ( "Unable to refresh, could not reach GitHub API" ) ;
0 commit comments