Skip to content

Commit d65736f

Browse files
committed
Fix examples project to use github.Timestamp
1 parent 5ae8401 commit d65736f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

example/commitpr/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func pushCommit(ref *github.Reference, tree *github.Tree) (err error) {
133133

134134
// Create the commit using the tree.
135135
date := time.Now()
136-
author := &github.CommitAuthor{Date: &date, Name: authorName, Email: authorEmail}
136+
author := &github.CommitAuthor{Date: &github.Timestamp{date}, Name: authorName, Email: authorEmail}
137137
commit := &github.Commit{Author: author, Message: commitMessage, Tree: tree, Parents: []*github.Commit{parent.Commit}}
138138
newCommit, _, err := client.Git.CreateCommit(ctx, *sourceOwner, *sourceRepo, commit)
139139
if err != nil {

0 commit comments

Comments
 (0)