Graphs use profile's email instead of commit's email
Summary
In the graphs section, the email shown is the one associated with the profile instead of the one set in the commit.
Steps to reproduce
- Set an email in the profile
- Set a different email in the local git config
- Make a commit
- See the contribution graphs: the email used is the primary one
What is the current bug behavior?
The primary email is shown in the contributions, instead of the commit email.
What is the expected correct behavior?
The commit email should be shown.
Comments
The problem comes from the fact that the primary email may be set to hidden, and it is still shown in the graphs (probably related to gitlab-ce#24221).
In my case I have another email set as an alias and that I use publicly. That one is the one used in the commits. However, it is not shown in the page. I imagine that the different mails are combined to produce the graph, and that is why this is happening. But I found gitlab-ce#22712 which states the contrary.
I'm not sure where the problem comes from, as some of my repositories have the email set correctly, but others appear with the main email instead. All produced under the same configuration. Also, I'm not sure if it has to do with how the alternative emails are setup, as the email settings says:
Your Public Email will be displayed on your public profile.
However, there is no option to define one of the emails as public or not.
Another thought. When editing through the gitlab interface, the main address is used, regardless of it is set to private, then that may also be why the primary email address is shown? But then, the contributions are merged based on that? (again contradicting gitlab-ce#22712)