@@ -396,10 +396,12 @@ Method CreateRelease(Owner As %String, Repo As %String, Input As %DynamicObject,
396
396
" tag_name" : (Input ." tag_name" ),
397
397
" target_commitish" : (Input ." target_commitish" ),
398
398
" name" : (Input .name ),
399
- " body" : (Input .body ),
400
- " draft" : false ,
401
- " prerelease" : false
402
- }.%ToJSON ()
399
+ " body" : (Input .body )
400
+ }
401
+ do json .%Set (" draft" , Input .%Get (" draft" , 0 ), " boolean" )
402
+ do json .%Set (" prerelease" , Input .%Get (" prerelease" , 0 ), " boolean" )
403
+
404
+ set json = json .%ToJSON ()
403
405
404
406
do ..Request .EntityBody .Write (json )
405
407
@@ -413,6 +415,29 @@ Method CreateRelease(Owner As %String, Repo As %String, Input As %DynamicObject,
413
415
Return st
414
416
}
415
417
418
+ Method UpdateRelease (Owner As %String , Repo As %String , Input As %DynamicObject , ReleaseID As %Integer ) As %Status
419
+ {
420
+
421
+ Set ..Request .Location = " /repos/" _Owner _" /" _Repo _" /releases/" _ReleaseID
422
+
423
+ set json = {
424
+ " tag_name" : (Input ." tag_name" ),
425
+ " target_commitish" : (Input ." target_commitish" ),
426
+ " name" : (Input .name ),
427
+ " body" : (Input .body )
428
+ }
429
+ do json .%Set (" draft" , Input .%Get (" draft" , 0 ), " boolean" )
430
+ do json .%Set (" prerelease" , Input .%Get (" prerelease" , 0 ), " boolean" )
431
+
432
+ set json = json .%ToJSON ()
433
+
434
+ do ..Request .EntityBody .Write (json )
435
+
436
+ Set st = ..Request .Patch ()
437
+
438
+ Return st
439
+ }
440
+
416
441
Method DeleteRelease (Owner As %String , Repo As %String , ReleaseID ) As %Status
417
442
{
418
443
Set ..Request .Location = " /repos/" _Owner _" /" _Repo _" /releases/" _ReleaseID
0 commit comments