Skip to content

Commit b5f88a4

Browse files
committed
Change notification and log messages for clarity
1 parent b3e973c commit b5f88a4

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/git/repository.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {getRemoteName} from "../configuration/configuration";
66
import {Protocol} from "../external/protocol";
77
import {logDebug, logError} from "../log";
88
import {API, GitExtension, RefType, RepositoryState} from "../typings/git";
9-
import {hasInternetConnectivity} from "../util";
9+
import {hasInternetConnectivity as canReachGitHubAPI} from "../util";
1010

1111
interface GitHubUrls {
1212
workspaceUri: vscode.Uri;
@@ -143,7 +143,7 @@ export async function getGitHubContext(): Promise<GitHubContext | undefined> {
143143
return gitHubContext;
144144
}
145145

146-
if (!(await hasInternetConnectivity())) {
146+
if (!(await canReachGitHubAPI())) {
147147
logError(new Error("Cannot fetch github context"));
148148
return undefined;
149149
}

src/treeViews/currentBranch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class CurrentBranchTreeProvider
4747
if (await hasInternetConnectivity()) {
4848
this._onDidChangeTreeData.fire(null);
4949
} else {
50-
await vscode.window.showWarningMessage("Unable to refresh, you are not connected to the internet");
50+
await vscode.window.showWarningMessage("Unable to refresh, could not reach GitHub API");
5151
}
5252
}
5353

src/treeViews/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class SettingsTreeProvider implements vscode.TreeDataProvider<SettingsExp
2626
if (await hasInternetConnectivity()) {
2727
this._onDidChangeTreeData.fire(null);
2828
} else {
29-
await vscode.window.showWarningMessage("Unable to refresh, you are not connected to the internet");
29+
await vscode.window.showWarningMessage("Unable to refresh, could not reach GitHub API");
3030
}
3131
}
3232

src/treeViews/workflows.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class WorkflowsTreeProvider
5050
if (await hasInternetConnectivity()) {
5151
this._onDidChangeTreeData.fire(null);
5252
} else {
53-
await vscode.window.showWarningMessage("Unable to refresh, you are not connected to the internet");
53+
await vscode.window.showWarningMessage("Unable to refresh, could not reach GitHub API");
5454
}
5555
}
5656

src/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export async function hasInternetConnectivity() {
1111
}
1212
});
1313
} catch {
14-
logError(new Error("Unable to connect to the internet"));
14+
logError(new Error("Unable to connect to GitHub API"));
1515
return false;
1616
}
1717
return true;

0 commit comments

Comments
 (0)