Skip to content

Commit 13ab0a7

Browse files
committed
Fix avatar for enterprise
Fixes microsoft#2771
1 parent 5b2f18a commit 13ab0a7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/github/folderRepositoryManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ export class FolderRepositoryManager implements vscode.Disposable {
16571657
login,
16581658
},
16591659
});
1660-
return parseGraphQLUser(data);
1660+
return parseGraphQLUser(data, githubRepository);
16611661
} catch (e) {
16621662
console.log(e);
16631663
}

src/github/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,11 +728,11 @@ export function parseGraphQLTimelineEvents(
728728
return normalizedEvents;
729729
}
730730

731-
export function parseGraphQLUser(user: GraphQL.UserResponse): User {
731+
export function parseGraphQLUser(user: GraphQL.UserResponse, githubRepository: GitHubRepository): User {
732732
return {
733733
login: user.user.login,
734734
name: user.user.name,
735-
avatarUrl: user.user.avatarUrl,
735+
avatarUrl: user.user.avatarUrl ? getAvatarWithEnterpriseFallback(user.user.avatarUrl, undefined, githubRepository.remote.authProviderId) : undefined,
736736
url: user.user.url,
737737
bio: user.user.bio,
738738
company: user.user.company,

0 commit comments

Comments
 (0)