mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 12:33:35 +01:00
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:
@@ -176,6 +176,10 @@ export async function getLink(gitAPI: GitAPI, useSelection: boolean, shouldEnsur
|
||||
return `${uriWithoutFileSegments}${fileSegments}`;
|
||||
}
|
||||
|
||||
export function getAvatarLink(userId: string, size: number): string {
|
||||
return `https://avatars.githubusercontent.com/u/${userId}?s=${size}`;
|
||||
}
|
||||
|
||||
export function getBranchLink(url: string, branch: string, hostPrefix: string = 'https://github.com') {
|
||||
const repo = getRepositoryFromUrl(url);
|
||||
if (!repo) {
|
||||
|
||||
Reference in New Issue
Block a user