Browse Source

Merge pull request '增加email的属性' (#822) from fix-674 into V20211115

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/822
Reviewed-by: lewis <747342561@qq.com>
tags/v1.21.12.1
lewis 3 years ago
parent
commit
bba82929d9
2 changed files with 4 additions and 0 deletions
  1. +3
    -0
      models/repo_activity_custom.go
  2. +1
    -0
      routers/api/v1/repo/repo_dashbord.go

+ 3
- 0
models/repo_activity_custom.go View File

@@ -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


+ 1
- 0
routers/api/v1/repo/repo_dashbord.go View File

@@ -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 {


Loading…
Cancel
Save