|
|
|
@@ -14,7 +14,6 @@ type ContributorWithUserId struct { |
|
|
|
UserId int64 |
|
|
|
IsAdmin bool |
|
|
|
RelAvatarLink string |
|
|
|
Email string |
|
|
|
} |
|
|
|
|
|
|
|
func GetRepoKPIStats(repo *Repository) (*git.RepoKPIStats, error) { |
|
|
|
@@ -145,11 +144,14 @@ func GetTop10Contributor(repoPath string) ([]ContributorWithUserId, error) { |
|
|
|
value, ok := contributorDistinctDict[user.Email] |
|
|
|
if !ok { |
|
|
|
contributorDistinctDict[user.Email] = ContributorWithUserId{ |
|
|
|
contributor, |
|
|
|
git.Contributor{ |
|
|
|
contributor.CommitCnt, |
|
|
|
user.Name, |
|
|
|
user.Email, |
|
|
|
}, |
|
|
|
user.ID, |
|
|
|
user.IsAdmin, |
|
|
|
user.RelAvatarLink(), |
|
|
|
user.Email, |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
@@ -164,7 +166,6 @@ func GetTop10Contributor(repoPath string) ([]ContributorWithUserId, error) { |
|
|
|
-1, |
|
|
|
false, |
|
|
|
"", |
|
|
|
contributor.Email, |
|
|
|
} |
|
|
|
} else { |
|
|
|
value.CommitCnt += contributor.CommitCnt |
|
|
|
|