From 97df7c9e8f971f0567dbd262562b655ca8684655 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Wed, 22 Mar 2023 06:27:14 +0900 Subject: [PATCH] add fingerprinting rules (#76) --- sentry/projects.go | 2 ++ sentry/projects_test.go | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/sentry/projects.go b/sentry/projects.go index afdc1df..c2a688e 100644 --- a/sentry/projects.go +++ b/sentry/projects.go @@ -40,6 +40,7 @@ type Project struct { ResolveAge int `json:"resolveAge"` DataScrubber bool `json:"dataScrubber"` DataScrubberDefaults bool `json:"dataScrubberDefaults"` + FingerprintingRules string `json:"fingerprintingRules"` GroupingEnhancements string `json:"groupingEnhancements"` SafeFields []string `json:"safeFields"` SensitiveFields []string `json:"sensitiveFields"` @@ -159,6 +160,7 @@ type UpdateProjectParams struct { ResolveAge *int `json:"resolveAge,omitempty"` Options map[string]interface{} `json:"options,omitempty"` AllowedDomains []string `json:"allowedDomains,omitempty"` + FingerprintingRules string `json:"fingerprintingRules,omitempty"` GroupingEnhancements string `json:"groupingEnhancements,omitempty"` } diff --git a/sentry/projects_test.go b/sentry/projects_test.go index d938df4..f5761e6 100644 --- a/sentry/projects_test.go +++ b/sentry/projects_test.go @@ -134,6 +134,7 @@ func TestProjectsService_List(t *testing.T) { }, "platform": null, "slug": "pump-station", + "fingerprintingRules": "fingerprinting rule", "groupingEnhancements": "pump station grouping enhancement rule", "status": "active" } @@ -216,6 +217,7 @@ func TestProjectsService_List(t *testing.T) { Type: "letter_avatar", }, Organization: expectedOrganization, + FingerprintingRules: "fingerprinting rule", GroupingEnhancements: "pump station grouping enhancement rule", }, } @@ -361,6 +363,7 @@ func TestProjectsService_Get(t *testing.T) { "name": "Powerful Abolitionist", "slug": "powerful-abolitionist" }], + "fingerprintingRules": "fingerprinting rule", "groupingEnhancements": "pump-station grouping enhancement rule", "verifySSL": false }`) @@ -417,6 +420,7 @@ func TestProjectsService_Get(t *testing.T) { AllowedDomains: []string{"*"}, DataScrubber: true, DataScrubberDefaults: true, + FingerprintingRules: "fingerprinting rule", GroupingEnhancements: "pump-station grouping enhancement rule", SafeFields: []string{}, SensitiveFields: []string{}, @@ -538,6 +542,7 @@ func TestProjectsService_Update(t *testing.T) { "callSignReviewed": false, "id": "5", "subjectTemplate": "[$project] ${tag:level}: $title", + "fingerprintingRules": "fingerprinting rule", "groupingEnhancements": "Plane Proxy grouping enhancement rule", "name": "Plane Proxy" }`) @@ -575,6 +580,7 @@ func TestProjectsService_Update(t *testing.T) { DigestsMaxDelay: 1800, ResolveAge: 720, SubjectTemplate: "[$project] ${tag:level}: $title", + FingerprintingRules: "fingerprinting rule", GroupingEnhancements: "Plane Proxy grouping enhancement rule", } assert.Equal(t, expected, project)