From 87d5da511e20cadb06f4d5d6ed287d7d0da07b88 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 12 Dec 2024 11:20:30 +0100 Subject: [PATCH] Cleanup: reformat to make the test setup code easier to read - break it to separate lines - use backticks for pattern so we need less quoting - don't unnecessarily quote forward slash in pattern --- pkg/integration/tests/commit/commit_with_prefix.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/integration/tests/commit/commit_with_prefix.go b/pkg/integration/tests/commit/commit_with_prefix.go index c2675f103..e83290bda 100644 --- a/pkg/integration/tests/commit/commit_with_prefix.go +++ b/pkg/integration/tests/commit/commit_with_prefix.go @@ -10,7 +10,12 @@ var CommitWithPrefix = NewIntegrationTest(NewIntegrationTestArgs{ ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(cfg *config.AppConfig) { - cfg.GetUserConfig().Git.CommitPrefixes = map[string]config.CommitPrefixConfig{"repo": {Pattern: "^\\w+\\/(\\w+-\\w+).*", Replace: "[$1]: "}} + cfg.GetUserConfig().Git.CommitPrefixes = map[string]config.CommitPrefixConfig{ + "repo": { + Pattern: `^\w+/(\w+-\w+).*`, + Replace: "[$1]: ", + }, + } }, SetupRepo: func(shell *Shell) { shell.NewBranch("feature/TEST-001")