Contributors graph does not differentiate commits between committers with the same full name
Summary
The Contributors graph does not correctly differentiate between different committers with the same full name value.
Steps to reproduce
- Create (or otherwise have access to) two accounts on GitLab.com.
- Set both of the accounts used for this reproduction to have the same Full name value in the user account settings page for each account. In this example, I used "Kyra Kitsune", though any value--provided they are the same--should function similarly.
- User A: Create a new project, and select the 'Initialize repository with a README' option to create a contribution with a README file we can edit immediately.
- View the state of the Contributors graph at this point (see Screenshot 1, below).
- User B: Edit README.md in the created repository with any desired change, commit the change, submit the MR, and with User A, accept the MR.
- View the state of the Contributors graph at this point (see Screenshot 2, below).
At this point, we can see that the contributions of User A and User B are, in effect, 'grouped' together, with the only outwardly visible change being the displayed email address for the displayed contribution graph.
Example Project
https://gitlab.com/kfkitsune-debug/contributors-graph-test/commits/master
What is the current bug behavior?
Contributions from distinct user accounts with the same 'Full name' value are being counted as a single contributor, for the purposes of the Contributors graph display.
What is the expected correct behavior?
Contributions from distinct user accounts should be displayed separately, as there may be an instance where two individuals with the same name may contribute to a project. From a logical perspective, it does not make sense to consider commits by two individual persons who coincidentally have the same full name value as being contributed by a single entity (thereby not correctly attributing commits).
This could mean that, while currently the graphs appear to be first grouped by full name value, they should be grouped by email address, or some other differentiating characteristic to prevent incorrect attribution of commits in the Contributors graph.
Relevant logs and/or screenshots
Screenshot 1: After Step 3 has been completed, we have one Contributor, one commit, and with the email address that was assigned to User A.
Screenshot 2: After Step 5 has been completed, we still have one Contributor listed, however the email address has been updated to that of User B. So in effect, the contributions of User A and User B are combined together; note that the number of commits has been updated to 2.
Screenshot 3: The results of the above reproduction steps as viewed in a GitLab CE Omnibus installation.
Output of checks
This bug happens on GitLab.com, and GitLab CE Omnibus 11.3.1 (32cb452ee03)
; environment detail provided below.
Results of GitLab environment info
Expand for output related to GitLab environment info
kyra@gitlab:~$ sudo gitlab-rake gitlab:env:info [sudo] password for kyra:System information System: Ubuntu 18.04 Current User: git Using RVM: no Ruby Version: 2.4.4p296 Gem Version: 2.7.6 Bundler Version:1.16.2 Rake Version: 12.3.1 Redis Version: 3.2.11 Git Version: 2.18.0 Sidekiq Version:5.1.3 Go Version: unknown
GitLab information Version: 11.3.1 Revision: 32cb452ee03 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: http://localhost HTTP Clone URL: http://localhost/some-group/some-project.git SSH Clone URL: git@localhost:some-group/some-project.git Using LDAP: no Using Omniauth: no
GitLab Shell Version: 8.3.3 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
kyra@gitlab:~$ sudo gitlab-rake gitlab:check SANITIZE=true Checking GitLab Shell ...GitLab Shell version >= 8.3.3 ? ... OK (8.3.3) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 1/1 ... ok 2/2 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... skipped (no tmp uploads folder yet) Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 1/1 ... yes 2/2 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.4) Git version >= 2.9.5 ? ... yes (2.18.0) Git user has default SSH configuration? ... yes Active users: ... 2
Checking GitLab ... Finished
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)