Skip to content

Commit

Permalink
show commits in reverse order and show full SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
hassansin committed Jul 11, 2018
1 parent 5622b6e commit bef4546
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,9 @@ func parseConfig(data []byte) (string, string) {

func releaseNotes(title string, commits []github.RepositoryCommit) string {
notes := ""
for _, c := range commits {
notes += fmt.Sprintf("* [%v] - %v\n", (*c.SHA)[0:6], *c.Commit.Message)
for i := len(commits) - 1; i >= 0; i-- {
lines := strings.Split(*commits[i].Commit.Message, "\n")
notes += fmt.Sprintf("* [%v] - %v\n", *commits[i].SHA, lines[0])
}
return fmt.Sprintf(`%v
# Please enter the realease title as the first line. Lines starting
Expand Down

0 comments on commit bef4546

Please sign in to comment.