Repository: google/go-github
File: github/repos.go (Go)

Code before:
	return Stringify(s)
}

// SecretScanningPushProtection specifies the state of secret scanning push protection on a repository.
//
// GitHub API docs: https://docs.github.com/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-partner-patterns
type SecretScanningPushProtection struct {
	Status *string `json:"status,omitempty"`
}

func (s SecretScanningPushProtection) String() string {
	return Stringify(s)
}

// DependabotSecurityUpdates specifies the state of Dependabot security updates on a repository.
//
// GitHub API docs: https://docs.github.com/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates
type DependabotSecurityUpdates struct {
	Status *string `json:"status,omitempty"`
}

func (d DependabotSecurityUpdates) String() string {
	return Stringify(d)
}

// Specifies the state of secret scanning validity checks on a repository.
//
// Github API docs: https://docs.github.com/en/enterprise-cloud@latest/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#allowing-validity-checks-for-partner-patterns-in-a-repository
type SecretScanningValidityChecks struct {
	Status *string `json:"status,omitempty"`
}

func (s SecretScanningValidityChecks) String() string {
	return Stringify(s)
}

// List calls either RepositoriesService.ListByUser or RepositoriesService.ListByAuthenticatedUser
// depending on whether user is empty.
//
// Deprecated: Use RepositoriesService.ListByUser or RepositoriesService.ListByAuthenticatedUser instead.
//
// GitHub API docs: https://docs.github.com/rest/repos/repos#list-repositories-for-a-user
// GitHub API docs: https://docs.github.com/rest/repos/repos#list-repositories-for-the-authenticated-user
//
//meta:operation GET /user/repos
//meta:operation GET /users/{username}/repos
func (s *RepositoriesService) List(ctx context.Context, user string, opts *RepositoryListOptions) ([]*Repository, *Response, error) {
	if opts == nil {
		opts = &RepositoryListOptions{}
	}
	if user != "" {

Review comment (security):
```suggestion
// SecretScanningValidityChecks represents the state of secret scanning validity checks on a repository.
```

Code after:
	return Stringify(s)
}

// SecretScanningPushProtection specifies the state of secret scanning push protection on a repository.
//
// GitHub API docs: https://docs.github.com/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-partner-patterns
type SecretScanningPushProtection struct {
	Status *string `json:"status,omitempty"`
}

func (s SecretScanningPushProtection) String() string {
	return Stringify(s)
}

// DependabotSecurityUpdates specifies the state of Dependabot security updates on a repository.
//
// GitHub API docs: https://docs.github.com/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates
type DependabotSecurityUpdates struct {
	Status *string `json:"status,omitempty"`
}

func (d DependabotSecurityUpdates) String() string {
	return Stringify(d)
}

// SecretScanningValidityChecks represents the state of secret scanning validity checks on a repository.
//
// GitHub API docs: https://docs.github.com/en/enterprise-cloud@latest/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#allowing-validity-checks-for-partner-patterns-in-a-repository
type SecretScanningValidityChecks struct {
	Status *string `json:"status,omitempty"`
}

// List calls either RepositoriesService.ListByUser or RepositoriesService.ListByAuthenticatedUser
// depending on whether user is empty.
//
// Deprecated: Use RepositoriesService.ListByUser or RepositoriesService.ListByAuthenticatedUser instead.
//
// GitHub API docs: https://docs.github.com/rest/repos/repos#list-repositories-for-a-user
// GitHub API docs: https://docs.github.com/rest/repos/repos#list-repositories-for-the-authenticated-user
//
//meta:operation GET /user/repos
//meta:operation GET /users/{username}/repos
func (s *RepositoriesService) List(ctx context.Context, user string, opts *RepositoryListOptions) ([]*Repository, *Response, error) {
	if opts == nil {
		opts = &RepositoryListOptions{}
	}
	if user != "" {
		return s.ListByUser(ctx, user, &RepositoryListByUserOptions{
			Type:        opts.Type,
			Sort:        opts.Sort,
			Direction:   opts.Direction,