mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 14:31:31 +01:00
Git - add avatar resolution to git blame editor decoration hover (#238083)
* Initial implementation * Add logging * Improve avatar resolution
This commit is contained in:
@@ -13,6 +13,24 @@ export interface ISourceControlHistoryItemDetailsProviderRegistry {
|
||||
getSourceControlHistoryItemDetailsProviders(): SourceControlHistoryItemDetailsProvider[];
|
||||
}
|
||||
|
||||
export async function provideSourceControlHistoryItemAvatar(
|
||||
registry: ISourceControlHistoryItemDetailsProviderRegistry,
|
||||
repository: Repository,
|
||||
commit: string,
|
||||
authorName?: string,
|
||||
authorEmail?: string
|
||||
): Promise<string | undefined> {
|
||||
for (const provider of registry.getSourceControlHistoryItemDetailsProviders()) {
|
||||
const result = await provider.provideAvatar(new ApiRepository(repository), commit, authorName, authorEmail);
|
||||
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export async function provideSourceControlHistoryItemHoverCommands(
|
||||
registry: ISourceControlHistoryItemDetailsProviderRegistry,
|
||||
repository: Repository
|
||||
|
||||
Reference in New Issue
Block a user