Extract remote source provider registry into the vscode.git-base extension (#137656)

This commit is contained in:
Ladislau Szomoru
2021-11-24 20:48:44 +01:00
committed by GitHub
parent 483d6f15ed
commit bfad20be9d
35 changed files with 946 additions and 258 deletions

View File

@@ -0,0 +1,18 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { publishRepository } from './publish';
import { API as GitAPI, RemoteSourcePublisher, Repository } from './typings/git';
export class GithubRemoteSourcePublisher implements RemoteSourcePublisher {
readonly name = 'GitHub';
readonly icon = 'github';
constructor(private gitAPI: GitAPI) { }
publishRepository(repository: Repository): Promise<void> {
return publishRepository(this.gitAPI, repository);
}
}