@@ -209,12 +209,13 @@ type ScanningAnalysis struct {
209209//
210210// GitHub API docs: https://docs.github.com/rest/code-scanning?apiVersion=2022-11-28
211211type SarifAnalysis struct {
212- CommitSHA * string `json:"commit_sha,omitempty "`
213- Ref * string `json:"ref,omitempty "`
214- Sarif * string `json:"sarif,omitempty "`
212+ CommitSHA string `json:"commit_sha"`
213+ Ref string `json:"ref"`
214+ Sarif string `json:"sarif"`
215215 CheckoutURI * string `json:"checkout_uri,omitempty"`
216216 StartedAt * Timestamp `json:"started_at,omitempty"`
217217 ToolName * string `json:"tool_name,omitempty"`
218+ Validate * bool `json:"validate,omitempty"`
218219}
219220
220221// CodeScanningAlertState specifies the state of a code scanning alert.
@@ -392,7 +393,7 @@ func (s *CodeScanningService) ListAlertInstances(ctx context.Context, owner, rep
392393// GitHub API docs: https://docs.github.com/rest/code-scanning/code-scanning?apiVersion=2022-11-28#upload-an-analysis-as-sarif-data
393394//
394395//meta:operation POST /repos/{owner}/{repo}/code-scanning/sarifs
395- func (s * CodeScanningService ) UploadSarif (ctx context.Context , owner , repo string , body * SarifAnalysis ) (* SarifID , * Response , error ) {
396+ func (s * CodeScanningService ) UploadSarif (ctx context.Context , owner , repo string , body SarifAnalysis ) (* SarifID , * Response , error ) {
396397 u := fmt .Sprintf ("repos/%v/%v/code-scanning/sarifs" , owner , repo )
397398
398399 req , err := s .client .NewRequest (ctx , "POST" , u , body )
0 commit comments