From fce595b10c0422acf7d11153d63282e3615dcdd1 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Mon, 15 Nov 2021 16:22:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0email=E7=9A=84=E5=B1=9E?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/repo_activity_custom.go | 3 +++ routers/api/v1/repo/repo_dashbord.go | 1 + 2 files changed, 4 insertions(+) diff --git a/models/repo_activity_custom.go b/models/repo_activity_custom.go index 779c50687..04f8f7ae1 100644 --- a/models/repo_activity_custom.go +++ b/models/repo_activity_custom.go @@ -14,6 +14,7 @@ type ContributorWithUserId struct { UserId int64 IsAdmin bool RelAvatarLink string + Email string } func GetRepoKPIStats(repo *Repository) (*git.RepoKPIStats, error) { @@ -148,6 +149,7 @@ func GetTop10Contributor(repoPath string) ([]ContributorWithUserId, error) { user.ID, user.IsAdmin, user.RelAvatarLink(), + user.Email, } } else { @@ -162,6 +164,7 @@ func GetTop10Contributor(repoPath string) ([]ContributorWithUserId, error) { -1, false, "", + contributor.Email, } } else { value.CommitCnt += contributor.CommitCnt diff --git a/routers/api/v1/repo/repo_dashbord.go b/routers/api/v1/repo/repo_dashbord.go index 81eb95f61..c08a7d8ca 100644 --- a/routers/api/v1/repo/repo_dashbord.go +++ b/routers/api/v1/repo/repo_dashbord.go @@ -36,6 +36,7 @@ type UserInfo struct { PR int64 `json:"pr"` Commit int `json:"commit"` RelAvatarLink string `json:"relAvatarLink"` + Email string `json:"email"` } type ProjectLatestData struct {