Skip to content

Commit

Permalink
Addjusted prBody and matching test/goldenfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvarts committed Aug 30, 2024
1 parent bb8e932 commit 14ac282
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/pkg/githubapi/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/githubapi/testdata/pr_body.golden.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
↘️ #1 `sourcePath1` ➡️
↘️ #1 `sourcePath1` ➡️
    `targetPath1`
    `targetPath2`
    ↘️ #2 `sourcePath2` ➡️
        `targetPath3`
        `targetPath3`
        `targetPath4`
        ↘️ #3 `sourcePath3` ➡️
            `targetPath5`
Expand Down

0 comments on commit 14ac282

Please sign in to comment.