MCPcopy Create free account
hub / github.com/bluekeyes/patch2pr / makeCommitAuthor

Function makeCommitAuthor

applier.go:394–412  ·  view source on GitHub ↗
(id *gitdiff.PatchIdentity, d time.Time)

Source from the content-addressed store, hash-verified

392}
393
394func makeCommitAuthor(id *gitdiff.PatchIdentity, d time.Time) *github.CommitAuthor {
395 if id == nil && d.IsZero() {
396 return nil
397 }
398
399 a := &github.CommitAuthor{}
400 if id != nil {
401 if id.Name != "" {
402 a.Name = github.Ptr(id.Name)
403 }
404 if id.Email != "" {
405 a.Email = github.Ptr(id.Email)
406 }
407 }
408 if !d.IsZero() {
409 a.Date = &github.Timestamp{Time: d}
410 }
411 return a
412}

Callers 1

CommitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected