diff --git a/example/commitpr/main.go b/example/commitpr/main.go index ca6ffc85a1..5913ec0668 100644 --- a/example/commitpr/main.go +++ b/example/commitpr/main.go @@ -133,7 +133,7 @@ func pushCommit(ref *github.Reference, tree *github.Tree) (err error) { // Create the commit using the tree. date := time.Now() - author := &github.CommitAuthor{Date: &date, Name: authorName, Email: authorEmail} + author := &github.CommitAuthor{Date: &github.Timestamp{date}, Name: authorName, Email: authorEmail} commit := &github.Commit{Author: author, Message: commitMessage, Tree: tree, Parents: []*github.Commit{parent.Commit}} newCommit, _, err := client.Git.CreateCommit(ctx, *sourceOwner, *sourceRepo, commit) if err != nil {