diff --git a/pkg/templating/template_description.go b/pkg/templating/template_description.go index 1ba70ef65..98a3a9eb3 100644 --- a/pkg/templating/template_description.go +++ b/pkg/templating/template_description.go @@ -87,9 +87,6 @@ func EnrichedIssueWithSeverityText(severity string) enrichedIssueOption { // EnrichedIssueWithCount allows customising the Enriched Issue's Count. func EnrichedIssueWithCount(count uint) enrichedIssueOption { return func(ei *enrichedIssue) error { - if count <= 0 { - return errors.Errorf("invalid count %d", count) - } ei.Count = count return nil } diff --git a/pkg/templating/template_description_test.go b/pkg/templating/template_description_test.go index 76a165552..a53f58626 100644 --- a/pkg/templating/template_description_test.go +++ b/pkg/templating/template_description_test.go @@ -239,14 +239,17 @@ func TestDescriptionOptions(t *testing.T) { }, }, { - name: "0 count returns err", + name: "0 count returns no err", args: args{ option: EnrichedIssueWithCount(0), }, - wantErr: true, + wantErr: false, + expectedEnrichedIssue: &enrichedIssue{ + Count: 0, + }, }, { - name: "positive count text returns no err", + name: "positive count returns no err", args: args{ option: EnrichedIssueWithCount(420), },