Git - Commit action button extension api (#154555)

This commit is contained in:
Ladislau Szomoru
2022-07-12 17:06:16 +02:00
committed by GitHub
parent 077c168e12
commit c7c0acd2ce
9 changed files with 165 additions and 96 deletions

View File

@@ -0,0 +1,30 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as nls from 'vscode-nls';
import { Command, Disposable } from 'vscode';
import { PostCommitCommandsProvider } from './api/git';
export interface IPostCommitCommandsProviderRegistry {
getPostCommitCommandsProviders(): PostCommitCommandsProvider[];
registerPostCommitCommandsProvider(provider: PostCommitCommandsProvider): Disposable;
}
const localize = nls.loadMessageBundle();
export class GitPostCommitCommandsProvider implements PostCommitCommandsProvider {
getCommands(): Command[] {
return [
{
command: 'git.push',
title: localize('scm secondary button commit and push', "Commit & Push")
},
{
command: 'git.sync',
title: localize('scm secondary button commit and sync', "Commit & Sync")
},
];
}
}