Skip to content

Commit e4426eb

Browse files
authored
Add command to show update release notes (microsoft#187590)
closes microsoft#187150
1 parent c3acc8d commit e4426eb

File tree

1 file changed

+17
-0
lines changed
  • src/vs/workbench/contrib/update/browser

1 file changed

+17
-0
lines changed

src/vs/workbench/contrib/update/browser/update.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,23 @@ export class UpdateContribution extends Disposable implements IWorkbenchContribu
461461
when: CONTEXT_UPDATE_STATE.isEqualTo(StateType.Ready)
462462
});
463463

464+
CommandsRegistry.registerCommand('update.showUpdateReleaseNotes', () => {
465+
if (this.updateService.state.type !== StateType.Ready) {
466+
return;
467+
}
468+
469+
const version = this.updateService.state.update.version;
470+
this.instantiationService.invokeFunction(accessor => showReleaseNotes(accessor, version));
471+
});
472+
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
473+
group: '7_update',
474+
command: {
475+
id: 'update.showUpdateReleaseNotes',
476+
title: nls.localize('showUpdateReleaseNotes', "Show Update Release Notes")
477+
},
478+
when: CONTEXT_UPDATE_STATE.isEqualTo(StateType.Ready)
479+
});
480+
464481
CommandsRegistry.registerCommand('_update.state', () => {
465482
return this.state;
466483
});

0 commit comments

Comments
 (0)