Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@
"markdownDescription": "Automatically log into the default URL when the extension is activated. coder.defaultUrl is preferred, otherwise the CODER_URL environment variable will be used. This setting has no effect if neither is set.",
"type": "boolean",
"default": false
},
"coder.disableUpdateNotifications": {
"markdownDescription": "Disable notifications when workspace template updates are available.",
"type": "boolean",
"default": false
}
}
},
Expand Down
9 changes: 9 additions & 0 deletions src/workspaceMonitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,16 @@ export class WorkspaceMonitor implements vscode.Disposable {

private maybeNotifyOutdated(workspace: Workspace) {
if (!this.notifiedOutdated && workspace.outdated) {
// Check if update notifications are disabled
const disableNotifications = vscode.workspace
.getConfiguration("coder")
.get<boolean>("disableUpdateNotifications", false);
if (disableNotifications) {
return;
}

this.notifiedOutdated = true;

this.restClient
.getTemplate(workspace.template_id)
.then((template) => {
Expand Down