|
|
@@ -126,7 +126,7 @@ func GetUserKPIStats(repoPath string) (map[string]*UserKPIStats, error) { |
|
|
|
|
|
|
|
func SetRepoKPIStats(repoPath string, fromTime time.Time, stats *RepoKPIStats, newContributers map[string]struct{}) error { |
|
|
|
since := fromTime.Format(time.RFC3339) |
|
|
|
args := []string{"log", "--numstat", "--no-merges", "--branches=*", "--pretty=format:---%n%h%n%an%n%ae%n", "--date=iso", fmt.Sprintf("--since='%s'", since)} |
|
|
|
args := []string{"log", "--numstat", "--no-merges", "HEAD", "--pretty=format:---%n%h%n%an%n%ae%n", "--date=iso", fmt.Sprintf("--since='%s'", since)} |
|
|
|
|
|
|
|
stdout, err := NewCommand(args...).RunInDirBytes(repoPath) |
|
|
|
if err != nil { |
|
|
@@ -212,7 +212,7 @@ func SetRepoKPIStats(repoPath string, fromTime time.Time, stats *RepoKPIStats, n |
|
|
|
|
|
|
|
func GetContributorsDetail(repoPath string, fromTime time.Time) ([]Contributor, error) { |
|
|
|
since := fromTime.Format(time.RFC3339) |
|
|
|
cmd := NewCommand("shortlog", "-sne", "--all", fmt.Sprintf("--since='%s'", since)) |
|
|
|
cmd := NewCommand("shortlog", "-sne", "HEAD", fmt.Sprintf("--since='%s'", since)) |
|
|
|
stdout, err := cmd.RunInDir(repoPath) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|