Browse Source

增加email的属性

tags/v1.21.12.1
ychao_1983 4 years ago
parent
commit
fce595b10c
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