import * as vscode from 'vscode' ; import { API as GitAPI } from './typings/git' ; import { publishRepository } from './publish' ; import { DisposableStore } from './util' ; export function registerCommands ( gitAPI ) { const disposables = new DisposableStore ( ) ; disposables . add ( vscode . commands . registerCommand ( 'github.publish' , async ( ) => { try { publishRepository ( gitAPI ) ; } catch ( err ) { vscode . window . showErrorMessage ( err . message ) ; } } ) ) ; return disposables ; }