GitHub - avatar resolution improvements (#238239)

* Add support for size

* Add support for extracting user id from GitHub no-reply email addresses

* Fix git blame email parsing

* Extrat link into function
This commit is contained in:
Ladislau Szomoru
2025-01-19 16:44:40 +01:00
committed by GitHub
parent 909c1538c2
commit 1600fb4c76
7 changed files with 63 additions and 42 deletions

View File

@@ -289,14 +289,19 @@ export interface BranchProtectionProvider {
provideBranchProtection(): BranchProtection[];
}
export interface AvatarQuery {
readonly commit: string;
export interface AvatarQueryCommit {
readonly hash: string;
readonly authorName?: string;
readonly authorEmail?: string;
}
export interface AvatarQuery {
readonly commits: AvatarQueryCommit[];
readonly size: number;
}
export interface SourceControlHistoryItemDetailsProvider {
provideAvatar(repository: Repository, query: AvatarQuery[]): Promise<Map<string, string | undefined> | undefined>;
provideAvatar(repository: Repository, query: AvatarQuery): Promise<Map<string, string | undefined> | undefined>;
provideHoverCommands(repository: Repository): Promise<Command[] | undefined>;
provideMessageLinks(repository: Repository, message: string): Promise<string | undefined>;
}