Skip to content

Commit a0eb7e6

Browse files
committed
fix: authassignment is now a string
1 parent 87a3266 commit a0eb7e6

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

sentry/project_ownerships.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type ProjectOwnership struct {
1313
DateCreated time.Time `json:"dateCreated"`
1414
LastUpdated time.Time `json:"lastUpdated"`
1515
IsActive bool `json:"isActive"`
16-
AutoAssignment bool `json:"autoAssignment"`
16+
AutoAssignment string `json:"autoAssignment"`
1717
CodeownersAutoSync *bool `json:"codeownersAutoSync,omitempty"`
1818
}
1919

@@ -39,10 +39,10 @@ func (s *ProjectOwnershipsService) Get(ctx context.Context, organizationSlug str
3939

4040
// CreateProjectParams are the parameters for ProjectOwnershipService.Update.
4141
type UpdateProjectOwnershipParams struct {
42-
Raw string `json:"raw,omitempty"`
43-
FallThrough *bool `json:"fallthrough,omitempty"`
44-
AutoAssignment *bool `json:"autoAssignment,omitempty"`
45-
CodeownersAutoSync *bool `json:"codeownersAutoSync,omitempty"`
42+
Raw string `json:"raw,omitempty"`
43+
FallThrough *bool `json:"fallthrough,omitempty"`
44+
AutoAssignment *string `json:"autoAssignment,omitempty"`
45+
CodeownersAutoSync *bool `json:"codeownersAutoSync,omitempty"`
4646
}
4747

4848
// Update a Project's Ownership configuration

sentry/project_ownerships_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func TestProjectOwnershipsService_Get(t *testing.T) {
2222
"dateCreated": "2021-11-18T13:09:16.819818Z",
2323
"lastUpdated": "2022-03-01T14:00:31.317734Z",
2424
"isActive": true,
25-
"autoAssignment": true,
25+
"autoAssignment": "Auto Assign to Issue Owner",
2626
"codeownersAutoSync": null
2727
}`)
2828
})
@@ -35,7 +35,7 @@ func TestProjectOwnershipsService_Get(t *testing.T) {
3535
Raw: "# assign issues to the product team, no matter the area\nurl:https://example.com/areas/*/*/products/* #product-team",
3636
FallThrough: false,
3737
IsActive: true,
38-
AutoAssignment: true,
38+
AutoAssignment: "Auto Assign to Issue Owner",
3939
CodeownersAutoSync: nil,
4040
DateCreated: mustParseTime("2021-11-18T13:09:16.819818Z"),
4141
LastUpdated: mustParseTime("2022-03-01T14:00:31.317734Z"),
@@ -60,7 +60,7 @@ func TestProjectOwnershipsService_Update(t *testing.T) {
6060
"dateCreated": "2021-11-18T13:09:16.819818Z",
6161
"lastUpdated": "2022-03-01T14:00:31.317734Z",
6262
"isActive": true,
63-
"autoAssignment": true,
63+
"autoAssignment": "Auto Assign to Issue Owner",
6464
"codeownersAutoSync": null
6565
}`)
6666
})
@@ -75,7 +75,7 @@ func TestProjectOwnershipsService_Update(t *testing.T) {
7575
Raw: "# assign issues to the product team, no matter the area\nurl:https://example.com/areas/*/*/products/* #product-team",
7676
FallThrough: false,
7777
IsActive: true,
78-
AutoAssignment: true,
78+
AutoAssignment: "Auto Assign to Issue Owner",
7979
CodeownersAutoSync: nil,
8080
DateCreated: mustParseTime("2021-11-18T13:09:16.819818Z"),
8181
LastUpdated: mustParseTime("2022-03-01T14:00:31.317734Z"),

0 commit comments

Comments
 (0)