Skip to content

Commit

Permalink
add logger
Browse files Browse the repository at this point in the history
  • Loading branch information
odanado committed Mar 24, 2024
1 parent 5de1a71 commit 1f865b5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,17 @@ func run(options Options) error {
currentTime := time.Now()
date := currentTime.Format("2006-01-02")
data, err := RenderTemplate(options.template, RenderTemplateData{pullRequests, date})
parts := strings.SplitN(data, "\n", 2)

title := parts[0]
body := parts[1]
logger.Println("Rendered template: ", data)

if err != nil {
return err
}

parts := strings.SplitN(data, "\n", 2)
title := parts[0]
body := parts[1]

logger.Println("Title of pull request: ", title)

pr, created, err := client.CreatePullRequest(ctx, title, body, from, to)
Expand Down

0 comments on commit 1f865b5

Please sign in to comment.