From d9ac2a5288523c907bbbe118046444e0a1dd7518 Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Sun, 14 Jul 2019 13:13:14 +0200 Subject: [PATCH] Add Inverse Exclusion option --- projects.go | 3 ++- projects_test.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/projects.go b/projects.go index d383c4b..97247da 100644 --- a/projects.go +++ b/projects.go @@ -48,7 +48,8 @@ var ( // Exclusion holds information about a regular expression used // to filter release versions. type Exclusion struct { - Value string `json:"value"` + Value string `json:"value"` + Inverse bool `json:"inverse"` } type projectsResponse struct { diff --git a/projects_test.go b/projects_test.go index f099f5e..58ff51a 100644 --- a/projects_test.go +++ b/projects_test.go @@ -408,7 +408,7 @@ var ( HangoutsChatWebhookIDs: []string{"hangouts123"}, MSTeamsWebhookIDs: []string{"teams123"}, WebhookIDs: []string{"webhook123", "webhook124"}, - Exclusions: []newreleases.Exclusion{{Value: "^1.9"}}, + Exclusions: []newreleases.Exclusion{{Value: "^1.9", Inverse: true}}, ExcludePrereleases: true, ExcludeUpdated: false, } @@ -419,7 +419,7 @@ var ( HangoutsChatWebhookIDs: []string{"hangouts123"}, MSTeamsWebhookIDs: []string{"teams123"}, WebhookIDs: []string{"webhook123", "webhook124"}, - Exclusions: []newreleases.Exclusion{{Value: "^1.9"}}, + Exclusions: []newreleases.Exclusion{{Value: "^1.9", Inverse: true}}, ExcludePrereleases: newreleases.Bool(true), ExcludeUpdated: newreleases.Bool(false), }