refactor: move git to package

This commit is contained in:
Julian Tölle 2024-08-30 22:47:50 +02:00
parent 44184a77f9
commit 5765b48703
10 changed files with 114 additions and 102 deletions

View file

@ -4,6 +4,8 @@ import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/apricote/releaser-pleaser/internal/git"
)
func ptr[T any](input T) *T {
@ -39,7 +41,7 @@ func Test_NewChangelogEntry(t *testing.T) {
args: args{
analyzedCommits: []AnalyzedCommit{
{
Commit: Commit{},
Commit: git.Commit{},
Type: "feat",
Description: "Foobar!",
},
@ -55,7 +57,7 @@ func Test_NewChangelogEntry(t *testing.T) {
args: args{
analyzedCommits: []AnalyzedCommit{
{
Commit: Commit{},
Commit: git.Commit{},
Type: "fix",
Description: "Foobar!",
},
@ -71,23 +73,23 @@ func Test_NewChangelogEntry(t *testing.T) {
args: args{
analyzedCommits: []AnalyzedCommit{
{
Commit: Commit{},
Commit: git.Commit{},
Type: "feat",
Description: "Blabla!",
},
{
Commit: Commit{},
Commit: git.Commit{},
Type: "feat",
Description: "So awesome!",
Scope: ptr("awesome"),
},
{
Commit: Commit{},
Commit: git.Commit{},
Type: "fix",
Description: "Foobar!",
},
{
Commit: Commit{},
Commit: git.Commit{},
Type: "fix",
Description: "So sad!",
Scope: ptr("sad"),
@ -114,7 +116,7 @@ func Test_NewChangelogEntry(t *testing.T) {
args: args{
analyzedCommits: []AnalyzedCommit{
{
Commit: Commit{},
Commit: git.Commit{},
Type: "fix",
Description: "Foobar!",
},
@ -137,7 +139,7 @@ func Test_NewChangelogEntry(t *testing.T) {
args: args{
analyzedCommits: []AnalyzedCommit{
{
Commit: Commit{},
Commit: git.Commit{},
Type: "fix",
Description: "Foobar!",
},