(commit Commit, now time.Time)
| 31 | } |
| 32 | |
| 33 | func allowCommit(commit Commit, now time.Time) bool { |
| 34 | if commit.AuthorName == "" && commit.AuthorEmail == "" { |
| 35 | logger().Debug( |
| 36 | "skipping commit with no author", |
| 37 | "commit", |
| 38 | commit.Name(), |
| 39 | ) |
| 40 | |
| 41 | return false |
| 42 | } |
| 43 | |
| 44 | if commit.Date.After(now) { |
| 45 | logger().Debug( |
| 46 | "skipping commit with commit date in the future", |
| 47 | "commit", |
| 48 | commit.Name(), |
| 49 | ) |
| 50 | |
| 51 | return false |
| 52 | } |
| 53 | |
| 54 | return true |
| 55 | } |
| 56 | |
| 57 | // Turns an iterator over lines from git log into an iterator of commits |
| 58 | func ParseCommits(lines iter.Seq[string]) (iter.Seq[Commit], func() error) { |
no test coverage detected