Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support fingerprint rules #76

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sentry/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`
}

Expand Down
6 changes: 6 additions & 0 deletions sentry/projects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -216,6 +217,7 @@ func TestProjectsService_List(t *testing.T) {
Type: "letter_avatar",
},
Organization: expectedOrganization,
FingerprintingRules: "fingerprinting rule",
GroupingEnhancements: "pump station grouping enhancement rule",
},
}
Expand Down Expand Up @@ -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
}`)
Expand Down Expand Up @@ -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{},
Expand Down Expand Up @@ -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"
}`)
Expand Down Expand Up @@ -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)
Expand Down