mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
GitHub - add "Open on GitHub" to blame hover (#237514)
* WIP - saving my work * Refactor hover rendering code
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Uri, env, l10n, workspace } from 'vscode';
|
||||
import { Command, Uri, env, l10n, workspace } from 'vscode';
|
||||
import { RemoteSourceProvider, RemoteSource, RemoteSourceAction } from './typings/git-base';
|
||||
import { getOctokit } from './auth';
|
||||
import { Octokit } from '@octokit/rest';
|
||||
@@ -136,4 +136,18 @@ export class GithubRemoteSourceProvider implements RemoteSourceProvider {
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
async getRemoteSourceControlHistoryItemCommands(url: string): Promise<Command[]> {
|
||||
const repository = getRepositoryFromUrl(url);
|
||||
if (!repository) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [{
|
||||
title: l10n.t('{0} Open on GitHub', '$(github)'),
|
||||
tooltip: l10n.t('Open on GitHub'),
|
||||
command: 'github.openOnGitHub',
|
||||
arguments: [url]
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user