mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-23 11:16:01 +00:00
Extract remote source provider registry into the vscode.git-base extension (#137656)
This commit is contained in:
18
extensions/github/src/remoteSourcePublisher.ts
Normal file
18
extensions/github/src/remoteSourcePublisher.ts
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user