Skip to content

Commit b647eda

Browse files
committed
Add String method and docs URL for CodeSecurity
1 parent 47f524d commit b647eda

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

github/github-stringify_test.go

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/repos.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,16 @@ type SecretScanningValidityChecks struct {
268268
}
269269

270270
// CodeSecurity represents the state of code security on a repository.
271+
//
272+
// GitHub API docs: https://docs.github.com/en/code-security/getting-started/github-security-features#available-with-github-code-security
271273
type CodeSecurity struct {
272274
Status *string `json:"status,omitempty"`
273275
}
274276

277+
func (c CodeSecurity) String() string {
278+
return Stringify(c)
279+
}
280+
275281
// List calls either RepositoriesService.ListByUser or RepositoriesService.ListByAuthenticatedUser
276282
// depending on whether user is empty.
277283
//

0 commit comments

Comments
 (0)