@@ -359,7 +359,7 @@ func TestSecretScanningService_UpdateAlert(t *testing.T) {
359
359
v := new (SecretScanningAlertUpdateOptions )
360
360
assertNilError (t , json .NewDecoder (r .Body ).Decode (v ))
361
361
362
- want := & SecretScanningAlertUpdateOptions {State : "resolved" , Resolution : String ("used_in_tests" )}
362
+ want := & SecretScanningAlertUpdateOptions {State : "resolved" , Resolution : String ("used_in_tests" ), ResolutionComment : String ( "resolution comment" ) }
363
363
364
364
if ! cmp .Equal (v , want ) {
365
365
t .Errorf ("Request body = %+v, want %+v" , v , want )
@@ -373,6 +373,7 @@ func TestSecretScanningService_UpdateAlert(t *testing.T) {
373
373
"locations_url": "https://api.github.com/repos/o/r/secret-scanning/alerts/1/locations",
374
374
"state": "resolved",
375
375
"resolution": "used_in_tests",
376
+ "resolution_comment": "resolution comment",
376
377
"resolved_at": "1996-06-20T00:00:00Z",
377
378
"resolved_by": null,
378
379
"secret_type": "mailchimp_api_key",
@@ -381,7 +382,7 @@ func TestSecretScanningService_UpdateAlert(t *testing.T) {
381
382
})
382
383
383
384
ctx := context .Background ()
384
- opts := & SecretScanningAlertUpdateOptions {State : "resolved" , Resolution : String ("used_in_tests" )}
385
+ opts := & SecretScanningAlertUpdateOptions {State : "resolved" , Resolution : String ("used_in_tests" ), ResolutionComment : String ( "resolution comment" ) }
385
386
386
387
alert , _ , err := client .SecretScanning .UpdateAlert (ctx , "o" , "r" , 1 , opts )
387
388
if err != nil {
@@ -390,17 +391,18 @@ func TestSecretScanningService_UpdateAlert(t *testing.T) {
390
391
391
392
date := Timestamp {time .Date (1996 , time .June , 20 , 00 , 00 , 00 , 0 , time .UTC )}
392
393
want := & SecretScanningAlert {
393
- Number : Int (1 ),
394
- CreatedAt : & date ,
395
- URL : String ("https://api.github.com/repos/o/r/secret-scanning/alerts/1" ),
396
- HTMLURL : String ("https://github.com/o/r/security/secret-scanning/1" ),
397
- LocationsURL : String ("https://api.github.com/repos/o/r/secret-scanning/alerts/1/locations" ),
398
- State : String ("resolved" ),
399
- Resolution : String ("used_in_tests" ),
400
- ResolvedAt : & date ,
401
- ResolvedBy : nil ,
402
- SecretType : String ("mailchimp_api_key" ),
403
- Secret : String ("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2" ),
394
+ Number : Int (1 ),
395
+ CreatedAt : & date ,
396
+ URL : String ("https://api.github.com/repos/o/r/secret-scanning/alerts/1" ),
397
+ HTMLURL : String ("https://github.com/o/r/security/secret-scanning/1" ),
398
+ LocationsURL : String ("https://api.github.com/repos/o/r/secret-scanning/alerts/1/locations" ),
399
+ State : String ("resolved" ),
400
+ Resolution : String ("used_in_tests" ),
401
+ ResolutionComment : String ("resolution comment" ),
402
+ ResolvedAt : & date ,
403
+ ResolvedBy : nil ,
404
+ SecretType : String ("mailchimp_api_key" ),
405
+ Secret : String ("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2" ),
404
406
}
405
407
406
408
if ! cmp .Equal (alert , want ) {
0 commit comments