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
This commit is contained in:
Stefan Haller 2024-12-12 11:20:30 +01:00
parent e29ddf46d2
commit 87d5da511e

View file

@ -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")