mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-02-09 03:07:02 +00:00
feat: push branch with changelog
This commit is contained in:
parent
8199918903
commit
c7743e0a80
10 changed files with 313 additions and 36 deletions
16
changelog.go
16
changelog.go
|
|
@ -90,16 +90,18 @@ func UpdateChangelogFile(wt *git.Worktree, newEntry string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func NewChangelogEntry(commits []AnalyzedCommit, version, link string) (string, error) {
|
||||
func NewChangelogEntry(changesets []Changeset, version, link string) (string, error) {
|
||||
features := make([]AnalyzedCommit, 0)
|
||||
fixes := make([]AnalyzedCommit, 0)
|
||||
|
||||
for _, commit := range commits {
|
||||
switch commit.Type {
|
||||
case "feat":
|
||||
features = append(features, commit)
|
||||
case "fix":
|
||||
fixes = append(fixes, commit)
|
||||
for _, changeset := range changesets {
|
||||
for _, commit := range changeset.ChangelogEntries {
|
||||
switch commit.Type {
|
||||
case "feat":
|
||||
features = append(features, commit)
|
||||
case "fix":
|
||||
fixes = append(fixes, commit)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue