Browse Source

提交代码

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/537/head
zouap 3 years ago
parent
commit
cc85fc2764
1 changed files with 13 additions and 8 deletions
  1. +13
    -8
      routers/repo/user_data_analysis.go

+ 13
- 8
routers/repo/user_data_analysis.go View File

@@ -31,16 +31,21 @@ func TimeingCountData() {
log.Error("wiki not exist. wikiPath=" + wikiPath)
} else {
log.Info("wiki exist, wikiPath=" + wikiPath)
list, _ := wikiRepo.GetCommitByPathAndDays(wikiPath, 1)
for logEntry := list.Front(); logEntry != nil; logEntry = logEntry.Next() {
commit := logEntry.Value.(*git.Commit)
log.Info("commit msg=" + commit.CommitMessage + " time=" + commit.Committer.When.Format("2006-01-02 15:04:05"))
if _, ok := wikiMap[commit.Committer.Name]; !ok {
wikiMap[commit.Committer.Name] = 0
} else {
wikiMap[commit.Committer.Name] += 1
list, err := wikiRepo.GetCommitByPathAndDays(wikiPath, 1)
if err != nil {
log.Info("err,err=v%", err)
} else {
for logEntry := list.Front(); logEntry != nil; logEntry = logEntry.Next() {
commit := logEntry.Value.(*git.Commit)
log.Info("commit msg=" + commit.CommitMessage + " time=" + commit.Committer.When.Format("2006-01-02 15:04:05"))
if _, ok := wikiMap[commit.Committer.Name]; !ok {
wikiMap[commit.Committer.Name] = 0
} else {
wikiMap[commit.Committer.Name] += 1
}
}
}

}
}
}


Loading…
Cancel
Save