Skip to content

Commit

Permalink
Merge pull request #95 from underdog-tech/jose/fix-grammar
Browse files Browse the repository at this point in the history
Fix grammar issue
  • Loading branch information
JoseAngel1196 authored Feb 26, 2024
2 parents 1d93495 + 045079c commit 67054bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion reporting/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ func (s *SlackReporter) generateEcosystemReport(reportBlocks []slack.Block, repo

func GetVulnerabilityWord(count int) string {
word := "vulnerabilities"
if count == 0 || count == 1 {
if count == 1 {
word = "vulnerability"
}
return word
Expand Down
4 changes: 2 additions & 2 deletions reporting/slack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func TestBuildSlackSummaryReport(t *testing.T) {
"type": "section",
"text": map[string]interface{}{
"type": "mrkdwn",
"text": ":first_place_medal: *Team Foo:* 0 vulnerability",
"text": ":first_place_medal: *Team Foo:* 0 vulnerabilities",
},
"accessory": map[string]interface{}{
"type": "overflow",
Expand Down Expand Up @@ -466,7 +466,7 @@ func TestGetVulnerabilityWord(t *testing.T) {
count int
expected string
}{
{count: 0, expected: "vulnerability"},
{count: 0, expected: "vulnerabilities"},
{count: 1, expected: "vulnerability"},
{count: 2, expected: "vulnerabilities"},
{count: 100, expected: "vulnerabilities"},
Expand Down

0 comments on commit 67054bd

Please sign in to comment.