Skip to content

Commit

Permalink
fix: authassignment is now a string
Browse files Browse the repository at this point in the history
  • Loading branch information
jianyuan committed Dec 16, 2023
1 parent 87a3266 commit a0eb7e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions sentry/project_ownerships.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type ProjectOwnership struct {
DateCreated time.Time `json:"dateCreated"`
LastUpdated time.Time `json:"lastUpdated"`
IsActive bool `json:"isActive"`
AutoAssignment bool `json:"autoAssignment"`
AutoAssignment string `json:"autoAssignment"`
CodeownersAutoSync *bool `json:"codeownersAutoSync,omitempty"`
}

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

// CreateProjectParams are the parameters for ProjectOwnershipService.Update.
type UpdateProjectOwnershipParams struct {
Raw string `json:"raw,omitempty"`
FallThrough *bool `json:"fallthrough,omitempty"`
AutoAssignment *bool `json:"autoAssignment,omitempty"`
CodeownersAutoSync *bool `json:"codeownersAutoSync,omitempty"`
Raw string `json:"raw,omitempty"`
FallThrough *bool `json:"fallthrough,omitempty"`
AutoAssignment *string `json:"autoAssignment,omitempty"`
CodeownersAutoSync *bool `json:"codeownersAutoSync,omitempty"`
}

// Update a Project's Ownership configuration
Expand Down
8 changes: 4 additions & 4 deletions sentry/project_ownerships_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestProjectOwnershipsService_Get(t *testing.T) {
"dateCreated": "2021-11-18T13:09:16.819818Z",
"lastUpdated": "2022-03-01T14:00:31.317734Z",
"isActive": true,
"autoAssignment": true,
"autoAssignment": "Auto Assign to Issue Owner",
"codeownersAutoSync": null
}`)
})
Expand All @@ -35,7 +35,7 @@ func TestProjectOwnershipsService_Get(t *testing.T) {
Raw: "# assign issues to the product team, no matter the area\nurl:https://example.com/areas/*/*/products/* #product-team",
FallThrough: false,
IsActive: true,
AutoAssignment: true,
AutoAssignment: "Auto Assign to Issue Owner",
CodeownersAutoSync: nil,
DateCreated: mustParseTime("2021-11-18T13:09:16.819818Z"),
LastUpdated: mustParseTime("2022-03-01T14:00:31.317734Z"),
Expand All @@ -60,7 +60,7 @@ func TestProjectOwnershipsService_Update(t *testing.T) {
"dateCreated": "2021-11-18T13:09:16.819818Z",
"lastUpdated": "2022-03-01T14:00:31.317734Z",
"isActive": true,
"autoAssignment": true,
"autoAssignment": "Auto Assign to Issue Owner",
"codeownersAutoSync": null
}`)
})
Expand All @@ -75,7 +75,7 @@ func TestProjectOwnershipsService_Update(t *testing.T) {
Raw: "# assign issues to the product team, no matter the area\nurl:https://example.com/areas/*/*/products/* #product-team",
FallThrough: false,
IsActive: true,
AutoAssignment: true,
AutoAssignment: "Auto Assign to Issue Owner",
CodeownersAutoSync: nil,
DateCreated: mustParseTime("2021-11-18T13:09:16.819818Z"),
LastUpdated: mustParseTime("2022-03-01T14:00:31.317734Z"),
Expand Down

0 comments on commit a0eb7e6

Please sign in to comment.