From 14ac2820ce4af52e42e0f6770adae3bd9f20355a Mon Sep 17 00:00:00 2001 From: Arthur Shvarts Date: Fri, 30 Aug 2024 10:47:35 -0400 Subject: [PATCH] Addjusted prBody and matching test/goldenfile --- internal/pkg/githubapi/github.go | 4 ++-- internal/pkg/githubapi/testdata/pr_body.golden.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/pkg/githubapi/github.go b/internal/pkg/githubapi/github.go index 25bbc10c..9e8bd32b 100644 --- a/internal/pkg/githubapi/github.go +++ b/internal/pkg/githubapi/github.go @@ -1055,8 +1055,8 @@ func prBody(keys []int, newPrMetadata prMetadata, newPrBody string) string { for i, k := range keys { sp = newPrMetadata.PreviousPromotionMetadata[k].SourcePath x := newPrMetadata.PreviousPromotionMetadata[k].TargetPaths - tp = strings.Join(x, fmt.Sprintf("`\n%s`", strings.Repeat(mkTab, i+1))) - newPrBody = newPrBody + fmt.Sprintf("%s↘️ #%d `%s` ➡️ \n%s`%s`\n", strings.Repeat(mkTab, i), k, sp, strings.Repeat(mkTab, i+1), tp) + tp = strings.Join(x, fmt.Sprintf("` \n%s`", strings.Repeat(mkTab, i+1))) + newPrBody = newPrBody + fmt.Sprintf("%s↘️ #%d `%s` ➡️ \n%s`%s` \n", strings.Repeat(mkTab, i), k, sp, strings.Repeat(mkTab, i+1), tp) } return newPrBody diff --git a/internal/pkg/githubapi/testdata/pr_body.golden.md b/internal/pkg/githubapi/testdata/pr_body.golden.md index 09ccf408..ef3693fe 100644 --- a/internal/pkg/githubapi/testdata/pr_body.golden.md +++ b/internal/pkg/githubapi/testdata/pr_body.golden.md @@ -1,8 +1,8 @@ -↘️ #1 `sourcePath1` ➡️ +↘️ #1 `sourcePath1` ➡️     `targetPath1`     `targetPath2`     ↘️ #2 `sourcePath2` ➡️ -        `targetPath3` +        `targetPath3`         `targetPath4`         ↘️ #3 `sourcePath3` ➡️             `targetPath5`