Skip to content

Commit

Permalink
feat: Show changelog for upcoming release if there are commits newer …
Browse files Browse the repository at this point in the history
…than the latest tag
  • Loading branch information
gabe565 committed Mar 12, 2024
1 parent 45e3d65 commit d7791d1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ func run(cmd *cobra.Command, args []string) error {
}
tags.Close()

head, err := repo.Reference(plumbing.HEAD, false)
if err != nil {
return err
}
if head.Hash() != latest.Hash() {
previous = latest
latest = head
}

commits, err := repo.Log(&git.LogOptions{})
if err != nil {
return err
Expand Down

0 comments on commit d7791d1

Please sign in to comment.