Skip to content

Commit

Permalink
refactor: remove redundant conditional
Browse files Browse the repository at this point in the history
Signed-off-by: Nico Braun <rainbowstack@gmail.com>
  • Loading branch information
bluebrown committed Oct 25, 2023
1 parent cd6e630 commit f0f6edf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions internal/gitbot/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ func (bot *GitBot) Do(ctx context.Context, callback DoCallback) error {
if err != nil {
return err
}
if changed {
bot.logger.Info().Str("base", bot.branch).Str("action", "commit/push").Msg("change detected")
}

bot.logger.Info().Str("base", bot.branch).Str("action", "commit/push").Msg("change detected")

return nil
}

Expand All @@ -119,8 +119,7 @@ func (bot *GitBot) Do(ctx context.Context, callback DoCallback) error {
return err
}

err = transport.AddCommitPush(ctx, fmt.Sprintf("kobold/%d", time.Now().Unix()), title, description)
if err != nil {
if err := transport.AddCommitPush(ctx, fmt.Sprintf("kobold/%d", time.Now().Unix()), title, description); err != nil {
return err
}

Expand Down

0 comments on commit f0f6edf

Please sign in to comment.