From eb1cfc6b1f4c42ae81429b84830ceeaf0c52fe0d Mon Sep 17 00:00:00 2001 From: Tyler Small Date: Thu, 12 Dec 2024 06:20:50 -0500 Subject: [PATCH] fix: Main commit message (#72) * fix: Main commit message * fix: Tests --- task/handler.go | 2 +- task/handler_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/task/handler.go b/task/handler.go index 8f67d65..42c37e0 100644 --- a/task/handler.go +++ b/task/handler.go @@ -71,7 +71,7 @@ func commitMessage(changes []krm.Change) (string, error) { seen := make(map[string]struct{}) msg := strings.Builder{} - if _, err := msg.WriteString("chore(kobold):\n"); err != nil { + if _, err := msg.WriteString("chore(kobold): Update image refs\n"); err != nil { return "", fmt.Errorf("write header: %w", err) } diff --git a/task/handler_test.go b/task/handler_test.go index 27cfc8e..269c9e2 100644 --- a/task/handler_test.go +++ b/task/handler_test.go @@ -26,7 +26,7 @@ func TestGetCommitMessage(t *testing.T) { }, }, }, - want: "chore(kobold):\n * busybox: busybox:1.0.0 -> busybox:1.0.1", + want: "chore(kobold): Update image refs\n * busybox: busybox:1.0.0 -> busybox:1.0.1", wantErr: false, }, { @@ -43,7 +43,7 @@ func TestGetCommitMessage(t *testing.T) { }, }, }, - want: "chore(kobold):\n * busybox: busybox:1.0.0 -> busybox:1.0.1\n * somerepo: somerepo:2.0.0 -> somerepo:2.0.1", + want: "chore(kobold): Update image refs\n * busybox: busybox:1.0.0 -> busybox:1.0.1\n * somerepo: somerepo:2.0.0 -> somerepo:2.0.1", wantErr: false, }, { @@ -60,7 +60,7 @@ func TestGetCommitMessage(t *testing.T) { }, }, }, - want: "chore(kobold):\n * busybox: busybox:1.0.0 -> busybox:1.0.1", + want: "chore(kobold): Update image refs\n * busybox: busybox:1.0.0 -> busybox:1.0.1", wantErr: false, }, }