(idType string)
| 468 | } |
| 469 | |
| 470 | func idFromEnv(idType string) *gitdiff.PatchIdentity { |
| 471 | name, hasName := os.LookupEnv(fmt.Sprintf("GIT_%s_NAME", idType)) |
| 472 | email, hasEmail := os.LookupEnv(fmt.Sprintf("GIT_%s_EMAIL", idType)) |
| 473 | if hasName && hasEmail { |
| 474 | return &gitdiff.PatchIdentity{Name: name, Email: email} |
| 475 | } |
| 476 | return nil |
| 477 | } |
| 478 | |
| 479 | func dateFromEnv(dateType string) time.Time { |
| 480 | if d, err := gitdiff.ParsePatchDate(os.Getenv(fmt.Sprintf("GIT_%s_DATE", dateType))); err == nil { |