Skip to content

Commit

Permalink
update to "aliases found"
Browse files Browse the repository at this point in the history
  • Loading branch information
jazanne committed Jul 27, 2023
1 parent 49bf7b5 commit 98d7c1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion comments/comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type FlagComments struct {
}

func BuildFlagComment(buildComment FlagComments, flagsRef lflags.FlagsRef, existingComment *github.IssueComment) string {
tableHeader := "| Flag name | Key | Aliases |\n| --- | --- | --- |"
tableHeader := "| Flag name | Key | Aliases found |\n| --- | --- | --- |"

var commentStr []string
commentStr = append(commentStr, "## LaunchDarkly flag references")
Expand Down
4 changes: 2 additions & 2 deletions comments/comments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (e *testCommentBuilder) RemovedOnly(t *testing.T) {
e.Comments.CommentsRemoved = []string{"comment1", "comment2"}
comment := BuildFlagComment(e.Comments, e.FlagsRef, nil)

expected := "## LaunchDarkly flag references\n### :red_circle: 2 flag references removed\n\n| Flag name | Key | Aliases |\n| --- | --- | --- |\ncomment1\ncomment2\n <!-- flags:example-flag,sample-flag -->\n <!-- comment hash: ef9e8187f6dece438b177756d5a287e5 -->"
expected := "## LaunchDarkly flag references\n### :red_circle: 2 flag references removed\n\n| Flag name | Key | Aliases found |\n| --- | --- | --- |\ncomment1\ncomment2\n <!-- flags:example-flag,sample-flag -->\n <!-- comment hash: ef9e8187f6dece438b177756d5a287e5 -->"
assert.Equal(t, expected, comment)
}

Expand All @@ -200,7 +200,7 @@ func (e *testCommentBuilder) AddedAndRemoved(t *testing.T) {
e.Comments.CommentsRemoved = []string{"comment1", "comment2"}
comment := BuildFlagComment(e.Comments, e.FlagsRef, nil)

expected := "## LaunchDarkly flag references\n### :green_circle: 1 flag reference added or modified\n\n| Flag name | Key | Aliases |\n| --- | --- | --- |\ncomment1\ncomment2\n\n\n### :red_circle: 1 flag reference removed\n\n| Flag name | Key | Aliases |\n| --- | --- | --- |\ncomment1\ncomment2\n <!-- flags:example-flag -->\n <!-- comment hash: af4e13e6bd401df02d3c61d5adb70933 -->"
expected := "## LaunchDarkly flag references\n### :green_circle: 1 flag reference added or modified\n\n| Flag name | Key | Aliases found |\n| --- | --- | --- |\ncomment1\ncomment2\n\n\n### :red_circle: 1 flag reference removed\n\n| Flag name | Key | Aliases found |\n| --- | --- | --- |\ncomment1\ncomment2\n <!-- flags:example-flag -->\n <!-- comment hash: af4e13e6bd401df02d3c61d5adb70933 -->"

assert.Equal(t, expected, comment)

Expand Down

0 comments on commit 98d7c1e

Please sign in to comment.