Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get GitLab avatar by email #302

Open
guidsdo opened this issue Mar 7, 2018 · 8 comments · May be fixed by #1636 or #2640
Open

Get GitLab avatar by email #302

guidsdo opened this issue Mar 7, 2018 · 8 comments · May be fixed by #1636 or #2640
Labels
feature New feature or request help wanted Want community input and/or pull request
Milestone

Comments

@guidsdo
Copy link

guidsdo commented Mar 7, 2018

In my company, we use GitLab and the user name is different from the name one commits with. This is due to our LDAP connection, which gives you a username like JDO for John Doe. Now I can't look at the person's face when viewing ones commits if they got registered after the LDAP connection.. :(

But the positive thing is that you can search a user's info by email. :)
You can do: https://gitlaburl/api/v4/users?username=john.doe@company.com

Btw, I loved what you did with the WYSIWYG settings editor.

@eamodio eamodio added the feature New feature or request label Mar 7, 2018
@eamodio
Copy link
Member

eamodio commented Mar 7, 2018

Thanks — appreciate the kind words.

This request is very similar to #281 and unfortunately my response is the same (at least at this point).

See #281 (comment)

Sounds like a lot of upfront processing work, that is very GitHub specific. I normally try to stay away from features that will only work with 1 provider/host, since I want GitLens to have a broader reach and no favorites 😄
Given the challenges here and the value of the feature imo -- it isn't worth the investment (for me). But if the community wants to submit a PR (start with a spec first please) I'm open.

@eamodio eamodio added the help wanted Want community input and/or pull request label Mar 7, 2018
@guidsdo
Copy link
Author

guidsdo commented Mar 7, 2018

Okay :), I might have some time to look into it.

@eamodio
Copy link
Member

eamodio commented Mar 8, 2018

You don't need to run vscode from source, just GitLens. Just clone the repo, run npm install and then you should be able to hit F5 in vscode.

FYI, just so you know for me to accept a PR around this, it can't negatively affect performance (startup or otherwise) and it can't interfere with offline support.

@eamodio
Copy link
Member

eamodio commented Mar 8, 2018

Also this should be a somewhat generic solution that can be used for GitHub and other providers that have avatar support.

@guidsdo
Copy link
Author

guidsdo commented Mar 8, 2018

Jeah I was looking at the remotes folder and can use the url of the repo to deduct what kind of repo someone has. Private repos like gitlab, mostly still have the word GitLab in it. Github is more straight forward.

[remote "origin"]
	url = gitlab@gitlab.privatenetwork.net:nicerepo/reporepo.git
	fetch = +refs/heads/*:refs/remotes/origin/*

@eamodio
Copy link
Member

eamodio commented Mar 8, 2018

FYI, GitLens already parses remotes -- which you can get access too by using Container.git.getRemotes(<repopath>) and the remotes will get automatically matched to a known provider if possible (those are the files in the `/git/remotes' folder.

@eamodio
Copy link
Member

eamodio commented Dec 2, 2020

This should be pretty easy to implement now as the infrastructure is there for GitHub, and should be copy-able for GitLab

@tmkx tmkx linked a pull request Sep 13, 2021 that will close this issue
7 tasks
@Nezteb
Copy link

Nezteb commented Mar 7, 2023

I'm not sure if this is the correct issue, but currently GitLens+ doesn't seem to pull my correct GitLab avatar: https://gitlab.com/Nezteb

Even if it did fallback to Gravatar, it should be using:
Screenshot 2023-03-06 at 6 38 39 PM

Instead I get:
Screenshot 2023-03-06 at 6 31 52 PM

I've verified that the commits have my correct email associated with them. The other randomized avatar is a coworker's, but his GitLab avatar is not set, so for him this is correct behavior.

Another odd thing is that despite having the avatar style set to robohash, the extension is still using identicon:
Screenshot 2023-03-06 at 6 35 28 PM

If there are any good ideas for debugging steps, let me know! I don't have any other git-related plugins installed, which is the only reason I'm assuming it's vscode-gitlens. 😅

A2-NieR added a commit to A2-NieR/vscode-gitlens that referenced this issue Apr 16, 2023
Refactor Github avatar function into a generic NoreplyAddress function with Gitlab avatar option

Closes gitkraken#302
@A2-NieR A2-NieR linked a pull request Apr 16, 2023 that will close this issue
7 tasks
A2-NieR added a commit to A2-NieR/vscode-gitlens that referenced this issue Apr 16, 2023
Refactor Github avatar function into a generic NoreplyAddress function with Gitlab avatar option

Closes gitkraken#302
A2-NieR added a commit to A2-NieR/vscode-gitlens that referenced this issue Apr 16, 2023
Refactor Github avatar function into a generic NoreplyAddress function with Gitlab avatar option

Closes gitkraken#302
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Want community input and/or pull request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants