gitkraken / vscode-gitlens

Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more
http://gitkraken.com/gitlens
Other
8.95k stars 1.28k forks source link

Get avatar from user #1036

Open jianghoy opened 4 years ago

jianghoy commented 4 years ago

There's already some feature request out there asking for avatar from Github or Gitlab. However, some users, like me, work in a corporate environment, so these avatar sources do not work well in this case. Besides, these requests have not been fulfilled so far.

It would be nice to allow users to choose their avatars from local source.

jianghoy commented 4 years ago

I'm willing to commit a PR if we nail down the specs. What I'm thinking of right now, is to have a page, or part of a page within settings of Gitlens, to let users specify which avatar URI (it could be both remote or local file) is mapped to which contributor.

sgtwilko commented 4 years ago

Simplest solution could be to point to a folder containing images with the email address, these could even be stored in the repo.

michaelblyons commented 3 years ago

I would also like such a thing to exist. I thought I had asked for it in the past, but apparently not. Then I can map my coworkers to their official photos, rather than whatever icon they have (sometimes none) on Gravatar.

Even now that the GitHub images are coming, I'd rather use my own images.


Simplest solution could be to point to a folder containing images with the email address.

I do not like this as much as a map. If "Jane" has several email addresses she has used, I don't want to make an image for each one. Just one jane.jpg and be done.

These could even be stored in the repo.

We have lots of repos. I don't want to put duplicate images in all of them. And really I do not want to check in the images at all.

eamodio commented 3 years ago

Maybe there can just be a setting that is a map of e-mails to file uris?

michaelblyons commented 3 years ago

Maybe there can just be a setting that is a map of e-mails to file uris?

Yes. That's exactly what I imagined. (All your avatar lookups happen after .mailmap transforms, right?)

sgtwilko commented 3 years ago

Simplest solution could be to point to a folder containing images with the email address.

I do not like this as much as a map. If "Jane" has several email addresses she has used, I don't want to make an image for each one. Just one jane.jpg and be done.

It would seem to me that a map to point to a folder is just doubling the work. You have to manage the folder images and the mapping.

If the image size is an issue (for avatar?) the user could use symbolic links to point to the same image.

If a co-worker has multiple emails you'd have to do some work duplicating the values in the map or duplicating the image.

How many co-workers actually have multiple emails in your repos?

All our repos required an email address from our AzureAD.

These could even be stored in the repo.

We have lots of repos. I don't want to put duplicate images in all of them. And really I do not want to check in the images at all.

Fairnuff, didn't say the feature had to point to the repo, just saying it could be stored there.

I'd assume that with or without a map you'd have to have a setting to specify the folder location?

Edit: Just to add; using just the folder approach allows you to have one location for images that can be shared across all people in the team, which can be updated by anyone in the team.

Having an additional map prevents that from seamlessly working.

eamodio commented 3 years ago

I'm honestly fine with either approach:

  1. New setting which is a hash (map) of email: filename
  2. New setting which is a string path that points to a folder which would contain images that match the email address

Or a 3rd approach of a combination of both:

  1. New setting that could be either -- a string path, or a hash
github-actions[bot] commented 3 years ago

This issue needs more information and has not had recent activity. Please provide the missing information or it will be closed in 7 days.\n\nThanks!

michaelblyons commented 3 years ago

Is there actually missing info or just a tag that is still sitting around? I feel like Eric's last comment pretty much covers any "need more info" stuff.

eamodio commented 3 years ago

@michaelblyons just a bad label, sorry for the noise.

Goddard commented 3 years ago

What gource does, is they use the username .jpg or .png...etc. This is inside the .git/avatars/ directory. I think this is what a lot of projects are doing. Some people make scripts to pull from gravatar, but you don't have to do that. You could just as easily place whatever image you want in that folder.

So if I worked on the project it would be "Ryein Goddard.png" and this can be from .mailmap or not.

atbeta commented 10 months ago

Really hope to add this feature.

pavlelee commented 4 months ago

This feature is very useful for corporate users