Skip to content

Commit e8329a2

Browse files
committed
make required field to value type
1 parent 1cec393 commit e8329a2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

github/repos.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2417,7 +2417,7 @@ func (s *RepositoriesService) DisablePrivateReporting(ctx context.Context, owner
24172417

24182418
// checkPrivateReporting represents whether private vulnerability reporting is enabled.
24192419
type checkPrivateReporting struct {
2420-
Enabled *bool `json:"enabled,omitempty"`
2420+
Enabled bool `json:"enabled"`
24212421
}
24222422

24232423
// IsPrivateReportingEnabled checks if private vulnerability reporting is enabled
@@ -2436,10 +2436,7 @@ func (s *RepositoriesService) IsPrivateReportingEnabled(ctx context.Context, own
24362436

24372437
privateReporting := new(checkPrivateReporting)
24382438
resp, err := s.client.Do(ctx, req, privateReporting)
2439-
if privateReporting.Enabled != nil {
2440-
return *privateReporting.Enabled, resp, err
2441-
}
2442-
return false, resp, err
2439+
return privateReporting.Enabled, resp, err
24432440
}
24442441

24452442
// ListRepositoryActivityOptions specifies the optional parameters to the

0 commit comments

Comments
 (0)