spliting up email and author

This commit is contained in:
zach rice committed 2019-03-29 18:04:49 -05:00
1 parent f9be4e543a
commit 56c89866a2
3 files changed
+18 -8

No files matched your search

+5 -2
View File
@@ -26,6 +26,7 @@ type Leak struct {
Type string `json:"reason"`
Message string `json:"commitMsg"`
Author string `json:"author"`
Email string `json:"email"`
File string `json:"file"`
Repo string `json:"repo"`
Date time.Time `json:"date"`
@@ -250,7 +251,8 @@ func (repoInfo *RepoInfo) audit() ([]Leak, error) {
filePath: filePath,
content: chunk.Content(),
sha: c.Hash.String(),
author: c.Author.String(),
author: c.Author.Name,
email: c.Author.Email,
message: strings.Replace(c.Message, "\n", " ", -1),
date: c.Author.When,
}
@@ -301,7 +303,8 @@ func (repoInfo *RepoInfo) auditSingleCommit(c *object.Commit) []Leak {
filePath: f.Name,
content: content,
sha: c.Hash.String(),
author: c.Author.String(),
author: c.Author.Name,
email: c.Author.Email,
message: strings.Replace(c.Message, "\n", " ", -1),
date: c.Author.When,
}