Merge branch '19550-fix-contributer-graph-duplicates' into 'master'
Resolve "contributor emails in contributors graphs is case sensitive" ## What does this MR do? changes author email to a case insensitive comparison so emails like "Somebody@foo.com" and "somebody@foo.com" are treated as a single author in contribution graphs. ## Are there points in the code the reviewer needs to double check? should be pretty simple ## Why was this MR needed? see above description ## Screenshots (if relevant) #### before: ![before](/uploads/873a073e8d31e1094da6f050ba3e3f51/before.png) #### after: ![after](/uploads/b9e534755615994f3e58442141c17f86/after.png) ## Does this MR meet the acceptance criteria? - [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [ ] ~~API support added~~ - Tests - [ ] ~~Added for this feature/bug~~ - [ ] ~~All builds are passing~~ - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #19550 See merge request !8021
This commit is contained in:
commit
0d04db92ef
|
@ -2,7 +2,7 @@
|
|||
(function() {
|
||||
window.ContributorsStatGraphUtil = {
|
||||
parse_log: function(log) {
|
||||
var by_author, by_email, data, entry, i, len, total;
|
||||
var by_author, by_email, data, entry, i, len, total, normalized_email;
|
||||
total = {};
|
||||
by_author = {};
|
||||
by_email = {};
|
||||
|
@ -11,7 +11,8 @@
|
|||
if (total[entry.date] == null) {
|
||||
this.add_date(entry.date, total);
|
||||
}
|
||||
data = by_author[entry.author_name] || by_email[entry.author_email];
|
||||
normalized_email = entry.author_email.toLowerCase();
|
||||
data = by_author[entry.author_name] || by_email[normalized_email];
|
||||
if (data == null) {
|
||||
data = this.add_author(entry, by_author, by_email);
|
||||
}
|
||||
|
@ -32,12 +33,14 @@
|
|||
return collection[date].date = date;
|
||||
},
|
||||
add_author: function(author, by_author, by_email) {
|
||||
var data;
|
||||
var data, normalized_email;
|
||||
data = {};
|
||||
data.author_name = author.author_name;
|
||||
data.author_email = author.author_email;
|
||||
normalized_email = author.author_email.toLowerCase();
|
||||
by_author[author.author_name] = data;
|
||||
return by_email[author.author_email] = data;
|
||||
by_email[normalized_email] = data;
|
||||
return data;
|
||||
},
|
||||
store_data: function(entry, total, by_author) {
|
||||
this.store_commits(total, by_author);
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: group authors in contribution graph with case insensitive email handle comparison
|
||||
merge_request: 8021
|
||||
author:
|
Loading…
Reference in New Issue