You've already forked go-semantic-release
feat(changelog): show authors of commits and show body as header
Enable new features in `.release.yml` like ```yml changelog: showAuthors: false ## Show authors in changelog showBodyAsHeader: false ## Show all bodies of the commits as header of changelog (useful for squash commit flow to show long text in release) ```
This commit is contained in:
committed by
Felix Wiedmann
parent
03f2eeadaa
commit
0c7338ab13
@@ -3,9 +3,10 @@ package gitutil
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/pkg/errors"
|
||||
"sort"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/Masterminds/semver"
|
||||
"github.com/Nightapes/go-semantic-release/internal/shared"
|
||||
"github.com/go-git/go-git/v5"
|
||||
@@ -176,10 +177,10 @@ func (g *GitUtil) GetCommits(lastTagHash *plumbing.Reference) ([]shared.Commit,
|
||||
commits := make(map[string]shared.Commit)
|
||||
|
||||
err = cIter.ForEach(func(c *object.Commit) error {
|
||||
log.Debugf("Found commit with hash %s", c.Hash.String())
|
||||
log.Debugf("Found commit with hash %s from %s", c.Hash.String(), c.Author.Name)
|
||||
commits[c.Hash.String()] = shared.Commit{
|
||||
Message: c.Message,
|
||||
Author: c.Committer.Name,
|
||||
Author: c.Author.Name,
|
||||
Hash: c.Hash.String(),
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user