diff --git a/internal/domain/macros.go b/internal/domain/macros.go index d934487..568c12e 100644 --- a/internal/domain/macros.go +++ b/internal/domain/macros.go @@ -48,6 +48,7 @@ type Macro struct { CurrentHour int CurrentMinute int CurrentSecond int + Tags string } func NewMacro(release Release) Macro { @@ -86,6 +87,7 @@ func NewMacro(release Release) Macro { CurrentHour: currentTime.Hour(), CurrentMinute: currentTime.Minute(), CurrentSecond: currentTime.Second(), + Tags: strings.Join(release.Tags, ", "), } return ma diff --git a/internal/domain/macros_test.go b/internal/domain/macros_test.go index 9a7bba2..25dc228 100644 --- a/internal/domain/macros_test.go +++ b/internal/domain/macros_test.go @@ -245,6 +245,15 @@ func TestMacros_Parse(t *testing.T) { want: "FilterID: 1", wantErr: false, }, + { + name: "test_tags", + release: Release{ + Tags: []string{"country", "rock"}, + }, + args: args{text: "Tags: {{ .Tags }}"}, + want: "Tags: country, rock", + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {