mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 09:59:47 -05:00
23 lines
800 B
TypeScript
23 lines
800 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import * as vscode from 'vscode';
|
|
import { API as GitAPI } from './typings/git';
|
|
import { publishRepository } from './publish';
|
|
|
|
export function registerCommands(gitAPI: GitAPI): vscode.Disposable[] {
|
|
const disposables = [];
|
|
|
|
disposables.push(vscode.commands.registerCommand('github.publish', async () => {
|
|
try {
|
|
publishRepository(gitAPI);
|
|
} catch (err) {
|
|
vscode.window.showErrorMessage(err.message);
|
|
}
|
|
}));
|
|
|
|
return disposables;
|
|
}
|