codecraftai-restclient-github-public 1.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (579) hide show
  1. ccai/restclient/github/public/__init__.py +0 -0
  2. ccai/restclient/github/public/generation/githubrestclientgenerator.py +56 -0
  3. ccai/restclient/github/public/generation/specs/api-hints.json +172 -0
  4. ccai/restclient/github/public/generation/specs/api-public.json +306020 -0
  5. ccai/restclient/github/public/generation/specs/pagination-hints.json +31 -0
  6. ccai/restclient/github/public/githubpublicrestclient.py +262 -0
  7. ccai/restclient/github/public/githubrestclientbase.py +120 -0
  8. ccai/restclient/github/public/groups/__init__.py +0 -0
  9. ccai/restclient/github/public/groups/actions.py +8042 -0
  10. ccai/restclient/github/public/groups/activity.py +1488 -0
  11. ccai/restclient/github/public/groups/apiinsights.py +478 -0
  12. ccai/restclient/github/public/groups/apps.py +1662 -0
  13. ccai/restclient/github/public/groups/billing.py +401 -0
  14. ccai/restclient/github/public/groups/campaigns.py +262 -0
  15. ccai/restclient/github/public/groups/checks.py +632 -0
  16. ccai/restclient/github/public/groups/classroom.py +276 -0
  17. ccai/restclient/github/public/groups/codescanning.py +1203 -0
  18. ccai/restclient/github/public/groups/codesecurity.py +997 -0
  19. ccai/restclient/github/public/groups/codesofconduct.py +92 -0
  20. ccai/restclient/github/public/groups/codespaces.py +2271 -0
  21. ccai/restclient/github/public/groups/copilot.py +517 -0
  22. ccai/restclient/github/public/groups/credentials.py +62 -0
  23. ccai/restclient/github/public/groups/dependabot.py +1155 -0
  24. ccai/restclient/github/public/groups/dependencygraph.py +152 -0
  25. ccai/restclient/github/public/groups/emojis.py +51 -0
  26. ccai/restclient/github/public/groups/gists.py +909 -0
  27. ccai/restclient/github/public/groups/git.py +734 -0
  28. ccai/restclient/github/public/groups/gitignore.py +96 -0
  29. ccai/restclient/github/public/groups/hostedcompute.py +290 -0
  30. ccai/restclient/github/public/groups/interactions.py +389 -0
  31. ccai/restclient/github/public/groups/issues.py +2460 -0
  32. ccai/restclient/github/public/groups/licenses.py +153 -0
  33. ccai/restclient/github/public/groups/markdown.py +88 -0
  34. ccai/restclient/github/public/groups/meta.py +213 -0
  35. ccai/restclient/github/public/groups/migrations.py +1079 -0
  36. ccai/restclient/github/public/groups/oidc.py +102 -0
  37. ccai/restclient/github/public/groups/orgs.py +3958 -0
  38. ccai/restclient/github/public/groups/packages.py +1316 -0
  39. ccai/restclient/github/public/groups/privateregistries.py +294 -0
  40. ccai/restclient/github/public/groups/projectsclassic.py +1154 -0
  41. ccai/restclient/github/public/groups/pulls.py +1469 -0
  42. ccai/restclient/github/public/groups/ratelimit.py +68 -0
  43. ccai/restclient/github/public/groups/reactions.py +1247 -0
  44. ccai/restclient/github/public/groups/repos.py +9741 -0
  45. ccai/restclient/github/public/groups/search.py +417 -0
  46. ccai/restclient/github/public/groups/secretscanning.py +568 -0
  47. ccai/restclient/github/public/groups/securityadvisories.py +541 -0
  48. ccai/restclient/github/public/groups/teams.py +2985 -0
  49. ccai/restclient/github/public/groups/users.py +2054 -0
  50. ccai/restclient/github/public/py.typed +0 -0
  51. ccai/restclient/github/public/schemas/__init__.py +0 -0
  52. ccai/restclient/github/public/schemas/actions.py +418 -0
  53. ccai/restclient/github/public/schemas/activity.py +95 -0
  54. ccai/restclient/github/public/schemas/actor.py +20 -0
  55. ccai/restclient/github/public/schemas/addedtoprojectissueevent.py +24 -0
  56. ccai/restclient/github/public/schemas/apps.py +151 -0
  57. ccai/restclient/github/public/schemas/assignedissueevent.py +25 -0
  58. ccai/restclient/github/public/schemas/authenticationtoken.py +20 -0
  59. ccai/restclient/github/public/schemas/automerge.py +16 -0
  60. ccai/restclient/github/public/schemas/basicerror.py +16 -0
  61. ccai/restclient/github/public/schemas/billing.py +27 -0
  62. ccai/restclient/github/public/schemas/billingusagereport.py +12 -0
  63. ccai/restclient/github/public/schemas/billingusagereportuser.py +12 -0
  64. ccai/restclient/github/public/schemas/campaigns.py +27 -0
  65. ccai/restclient/github/public/schemas/checkrunwithsimplechecksuite.py +31 -0
  66. ccai/restclient/github/public/schemas/checks.py +80 -0
  67. ccai/restclient/github/public/schemas/classroom.py +109 -0
  68. ccai/restclient/github/public/schemas/codeofconductsimple.py +18 -0
  69. ccai/restclient/github/public/schemas/codescanning.py +197 -0
  70. ccai/restclient/github/public/schemas/codescanningalertlocation.py +17 -0
  71. ccai/restclient/github/public/schemas/codescanningalertrule.py +20 -0
  72. ccai/restclient/github/public/schemas/codescanningalertrulesummary.py +20 -0
  73. ccai/restclient/github/public/schemas/codescanninganalysistool.py +14 -0
  74. ccai/restclient/github/public/schemas/codescanningautofixcommitsresponse.py +11 -0
  75. ccai/restclient/github/public/schemas/codescanningdefaultsetupupdateresponse.py +15 -0
  76. ccai/restclient/github/public/schemas/codescanningsarifsreceipt.py +11 -0
  77. ccai/restclient/github/public/schemas/codescanningvariantanalysisrepository.py +20 -0
  78. ccai/restclient/github/public/schemas/codescanningvariantanalysisskippedrepogroup.py +13 -0
  79. ccai/restclient/github/public/schemas/codesecurity.py +73 -0
  80. ccai/restclient/github/public/schemas/codesofconduct.py +19 -0
  81. ccai/restclient/github/public/schemas/codespaces.py +130 -0
  82. ccai/restclient/github/public/schemas/codespacewithfullrepository.py +45 -0
  83. ccai/restclient/github/public/schemas/commit.py +25 -0
  84. ccai/restclient/github/public/schemas/contenttree.py +27 -0
  85. ccai/restclient/github/public/schemas/convertednotetoissueissueevent.py +24 -0
  86. ccai/restclient/github/public/schemas/copilot.py +50 -0
  87. ccai/restclient/github/public/schemas/copilotdotcomchat.py +16 -0
  88. ccai/restclient/github/public/schemas/copilotdotcompullrequests.py +16 -0
  89. ccai/restclient/github/public/schemas/copilotidechat.py +16 -0
  90. ccai/restclient/github/public/schemas/copilotidecodecompletions.py +17 -0
  91. ccai/restclient/github/public/schemas/copilotorganizationseatbreakdown.py +18 -0
  92. ccai/restclient/github/public/schemas/cvssseverities.py +13 -0
  93. ccai/restclient/github/public/schemas/demilestonedissueevent.py +24 -0
  94. ccai/restclient/github/public/schemas/dependabot.py +87 -0
  95. ccai/restclient/github/public/schemas/dependabotalertpackage.py +14 -0
  96. ccai/restclient/github/public/schemas/dependabotalertsecurityadvisory.py +29 -0
  97. ccai/restclient/github/public/schemas/dependabotalertsecurityvulnerability.py +18 -0
  98. ccai/restclient/github/public/schemas/dependency.py +16 -0
  99. ccai/restclient/github/public/schemas/dependencygraph.py +29 -0
  100. ccai/restclient/github/public/schemas/deploymentsimple.py +28 -0
  101. ccai/restclient/github/public/schemas/discussion.py +37 -0
  102. ccai/restclient/github/public/schemas/enterprise.py +24 -0
  103. ccai/restclient/github/public/schemas/enterpriseteam.py +27 -0
  104. ccai/restclient/github/public/schemas/enterprisewebhooks.py +26 -0
  105. ccai/restclient/github/public/schemas/gisthistory.py +19 -0
  106. ccai/restclient/github/public/schemas/gists.py +88 -0
  107. ccai/restclient/github/public/schemas/git.py +71 -0
  108. ccai/restclient/github/public/schemas/gitignore.py +14 -0
  109. ccai/restclient/github/public/schemas/hookdelivery.py +29 -0
  110. ccai/restclient/github/public/schemas/hookdeliveryitem.py +26 -0
  111. ccai/restclient/github/public/schemas/hookresponse.py +14 -0
  112. ccai/restclient/github/public/schemas/hostedcompute.py +30 -0
  113. ccai/restclient/github/public/schemas/installation.py +35 -0
  114. ccai/restclient/github/public/schemas/installationtoken.py +22 -0
  115. ccai/restclient/github/public/schemas/interactions.py +23 -0
  116. ccai/restclient/github/public/schemas/issuedependenciessummary.py +13 -0
  117. ccai/restclient/github/public/schemas/issueeventdismissedreview.py +15 -0
  118. ccai/restclient/github/public/schemas/issueeventlabel.py +16 -0
  119. ccai/restclient/github/public/schemas/issueeventmilestone.py +13 -0
  120. ccai/restclient/github/public/schemas/issueeventprojectcard.py +18 -0
  121. ccai/restclient/github/public/schemas/issueeventrename.py +14 -0
  122. ccai/restclient/github/public/schemas/issuefieldvalue.py +19 -0
  123. ccai/restclient/github/public/schemas/issues.py +135 -0
  124. ccai/restclient/github/public/schemas/labeledissueevent.py +24 -0
  125. ccai/restclient/github/public/schemas/licenses.py +58 -0
  126. ccai/restclient/github/public/schemas/link.py +13 -0
  127. ccai/restclient/github/public/schemas/linkwithtype.py +14 -0
  128. ccai/restclient/github/public/schemas/lockedissueevent.py +24 -0
  129. ccai/restclient/github/public/schemas/manifest.py +15 -0
  130. ccai/restclient/github/public/schemas/marketplaceaccount.py +18 -0
  131. ccai/restclient/github/public/schemas/mergegroup.py +17 -0
  132. ccai/restclient/github/public/schemas/meta.py +67 -0
  133. ccai/restclient/github/public/schemas/migrations.py +84 -0
  134. ccai/restclient/github/public/schemas/milestonedissueevent.py +24 -0
  135. ccai/restclient/github/public/schemas/minimalrepository.py +102 -0
  136. ccai/restclient/github/public/schemas/movedcolumninprojectissueevent.py +24 -0
  137. ccai/restclient/github/public/schemas/nullableactionshostedrunnerpoolimage.py +16 -0
  138. ccai/restclient/github/public/schemas/nullablecodeofconductsimple.py +18 -0
  139. ccai/restclient/github/public/schemas/nullablecodespacemachine.py +21 -0
  140. ccai/restclient/github/public/schemas/nullablecollaborator.py +37 -0
  141. ccai/restclient/github/public/schemas/nullablecommunityhealthfile.py +11 -0
  142. ccai/restclient/github/public/schemas/nullablegituser.py +15 -0
  143. ccai/restclient/github/public/schemas/nullableintegration.py +28 -0
  144. ccai/restclient/github/public/schemas/nullableissue.py +52 -0
  145. ccai/restclient/github/public/schemas/nullablelicensesimple.py +20 -0
  146. ccai/restclient/github/public/schemas/nullablemilestone.py +30 -0
  147. ccai/restclient/github/public/schemas/nullableminimalrepository.py +102 -0
  148. ccai/restclient/github/public/schemas/nullableorganizationsimple.py +26 -0
  149. ccai/restclient/github/public/schemas/nullableprojectsv2statusupdate.py +24 -0
  150. ccai/restclient/github/public/schemas/nullablerepository.py +110 -0
  151. ccai/restclient/github/public/schemas/nullablerepositorywebhooks.py +115 -0
  152. ccai/restclient/github/public/schemas/nullablescopedinstallation.py +18 -0
  153. ccai/restclient/github/public/schemas/nullablesimplecommit.py +20 -0
  154. ccai/restclient/github/public/schemas/nullablesimplerepository.py +60 -0
  155. ccai/restclient/github/public/schemas/nullablesimpleuser.py +36 -0
  156. ccai/restclient/github/public/schemas/nullableteamsimple.py +27 -0
  157. ccai/restclient/github/public/schemas/oidc.py +15 -0
  158. ccai/restclient/github/public/schemas/organizationinvitation.py +26 -0
  159. ccai/restclient/github/public/schemas/organizationsimplewebhooks.py +27 -0
  160. ccai/restclient/github/public/schemas/orgprivateregistryconfigurationwithselectedrepositories.py +21 -0
  161. ccai/restclient/github/public/schemas/orgs.py +332 -0
  162. ccai/restclient/github/public/schemas/packages.py +42 -0
  163. ccai/restclient/github/public/schemas/pagebuildstatus.py +14 -0
  164. ccai/restclient/github/public/schemas/pageshttpscertificate.py +15 -0
  165. ccai/restclient/github/public/schemas/pagessourcehash.py +11 -0
  166. ccai/restclient/github/public/schemas/personalaccesstokenrequest.py +28 -0
  167. ccai/restclient/github/public/schemas/privateregistries.py +20 -0
  168. ccai/restclient/github/public/schemas/projectsclassic.py +70 -0
  169. ccai/restclient/github/public/schemas/projectsv2.py +31 -0
  170. ccai/restclient/github/public/schemas/projectsv2item.py +23 -0
  171. ccai/restclient/github/public/schemas/projectsv2iterationsetting.py +20 -0
  172. ccai/restclient/github/public/schemas/projectsv2singleselectoption.py +18 -0
  173. ccai/restclient/github/public/schemas/projectsv2statusupdate.py +24 -0
  174. ccai/restclient/github/public/schemas/protectedbranchrequiredstatuscheck.py +20 -0
  175. ccai/restclient/github/public/schemas/publicip.py +15 -0
  176. ccai/restclient/github/public/schemas/pullrequestminimal.py +16 -0
  177. ccai/restclient/github/public/schemas/pullrequestsimple.py +50 -0
  178. ccai/restclient/github/public/schemas/pulls.py +185 -0
  179. ccai/restclient/github/public/schemas/ratelimit.py +23 -0
  180. ccai/restclient/github/public/schemas/reactions.py +17 -0
  181. ccai/restclient/github/public/schemas/referencedworkflow.py +15 -0
  182. ccai/restclient/github/public/schemas/removedfromprojectissueevent.py +24 -0
  183. ccai/restclient/github/public/schemas/renamedissueevent.py +24 -0
  184. ccai/restclient/github/public/schemas/repos.py +952 -0
  185. ccai/restclient/github/public/schemas/repository.py +110 -0
  186. ccai/restclient/github/public/schemas/repositoryadvisorycredit.py +15 -0
  187. ccai/restclient/github/public/schemas/repositoryadvisoryvulnerability.py +18 -0
  188. ccai/restclient/github/public/schemas/repositoryrulebranchnamepattern.py +16 -0
  189. ccai/restclient/github/public/schemas/repositoryrulecodescanning.py +16 -0
  190. ccai/restclient/github/public/schemas/repositoryrulecommitauthoremailpattern.py +16 -0
  191. ccai/restclient/github/public/schemas/repositoryrulecommitmessagepattern.py +16 -0
  192. ccai/restclient/github/public/schemas/repositoryrulecommitteremailpattern.py +16 -0
  193. ccai/restclient/github/public/schemas/repositoryrulecreation.py +13 -0
  194. ccai/restclient/github/public/schemas/repositoryruledeletion.py +13 -0
  195. ccai/restclient/github/public/schemas/repositoryrulefileextensionrestriction.py +16 -0
  196. ccai/restclient/github/public/schemas/repositoryrulefilepathrestriction.py +16 -0
  197. ccai/restclient/github/public/schemas/repositoryrulemaxfilepathlength.py +16 -0
  198. ccai/restclient/github/public/schemas/repositoryrulemaxfilesize.py +16 -0
  199. ccai/restclient/github/public/schemas/repositoryrulemergequeue.py +16 -0
  200. ccai/restclient/github/public/schemas/repositoryrulenonfastforward.py +13 -0
  201. ccai/restclient/github/public/schemas/repositoryruleparamscodescanningtool.py +15 -0
  202. ccai/restclient/github/public/schemas/repositoryruleparamsrequiredreviewerconfiguration.py +17 -0
  203. ccai/restclient/github/public/schemas/repositoryruleparamsrestrictedcommits.py +14 -0
  204. ccai/restclient/github/public/schemas/repositoryruleparamsreviewer.py +14 -0
  205. ccai/restclient/github/public/schemas/repositoryruleparamsstatuscheckconfiguration.py +14 -0
  206. ccai/restclient/github/public/schemas/repositoryruleparamsworkflowfilereference.py +16 -0
  207. ccai/restclient/github/public/schemas/repositoryrulepullrequest.py +16 -0
  208. ccai/restclient/github/public/schemas/repositoryrulerequireddeployments.py +16 -0
  209. ccai/restclient/github/public/schemas/repositoryrulerequiredlinearhistory.py +13 -0
  210. ccai/restclient/github/public/schemas/repositoryrulerequiredsignatures.py +13 -0
  211. ccai/restclient/github/public/schemas/repositoryrulerequiredstatuschecks.py +16 -0
  212. ccai/restclient/github/public/schemas/repositoryrulerulesetinfo.py +15 -0
  213. ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositoryidtarget.py +15 -0
  214. ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositorynametarget.py +15 -0
  215. ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositorypropertyspec.py +17 -0
  216. ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositorypropertytarget.py +15 -0
  217. ccai/restclient/github/public/schemas/repositoryruletagnamepattern.py +16 -0
  218. ccai/restclient/github/public/schemas/repositoryruleupdate.py +16 -0
  219. ccai/restclient/github/public/schemas/repositoryruleviolationerror.py +18 -0
  220. ccai/restclient/github/public/schemas/repositoryruleworkflows.py +16 -0
  221. ccai/restclient/github/public/schemas/repositorywebhooks.py +115 -0
  222. ccai/restclient/github/public/schemas/reviewdismissedissueevent.py +24 -0
  223. ccai/restclient/github/public/schemas/reviewrequestedissueevent.py +26 -0
  224. ccai/restclient/github/public/schemas/reviewrequestremovedissueevent.py +26 -0
  225. ccai/restclient/github/public/schemas/rulesetversion.py +17 -0
  226. ccai/restclient/github/public/schemas/runnerlabel.py +15 -0
  227. ccai/restclient/github/public/schemas/scimerror.py +20 -0
  228. ccai/restclient/github/public/schemas/search.py +263 -0
  229. ccai/restclient/github/public/schemas/secretscanning.py +96 -0
  230. ccai/restclient/github/public/schemas/secretscanningalertwebhook.py +33 -0
  231. ccai/restclient/github/public/schemas/secretscanninglocationcommit.py +21 -0
  232. ccai/restclient/github/public/schemas/secretscanninglocationdiscussionbody.py +13 -0
  233. ccai/restclient/github/public/schemas/secretscanninglocationdiscussioncomment.py +13 -0
  234. ccai/restclient/github/public/schemas/secretscanninglocationdiscussiontitle.py +13 -0
  235. ccai/restclient/github/public/schemas/secretscanninglocationissuebody.py +13 -0
  236. ccai/restclient/github/public/schemas/secretscanninglocationissuecomment.py +13 -0
  237. ccai/restclient/github/public/schemas/secretscanninglocationissuetitle.py +13 -0
  238. ccai/restclient/github/public/schemas/secretscanninglocationpullrequestbody.py +13 -0
  239. ccai/restclient/github/public/schemas/secretscanninglocationpullrequestcomment.py +13 -0
  240. ccai/restclient/github/public/schemas/secretscanninglocationpullrequestreview.py +13 -0
  241. ccai/restclient/github/public/schemas/secretscanninglocationpullrequestreviewcomment.py +13 -0
  242. ccai/restclient/github/public/schemas/secretscanninglocationpullrequesttitle.py +13 -0
  243. ccai/restclient/github/public/schemas/secretscanninglocationwikicommit.py +21 -0
  244. ccai/restclient/github/public/schemas/secretscanningpatternoverride.py +23 -0
  245. ccai/restclient/github/public/schemas/secretscanningscan.py +18 -0
  246. ccai/restclient/github/public/schemas/securityadvisories.py +106 -0
  247. ccai/restclient/github/public/schemas/securityadvisoryepss.py +14 -0
  248. ccai/restclient/github/public/schemas/securityandanalysis.py +18 -0
  249. ccai/restclient/github/public/schemas/shortblob.py +14 -0
  250. ccai/restclient/github/public/schemas/simplechecksuite.py +28 -0
  251. ccai/restclient/github/public/schemas/simpleclassroomorganization.py +20 -0
  252. ccai/restclient/github/public/schemas/simpleclassroomrepository.py +18 -0
  253. ccai/restclient/github/public/schemas/simpleclassroomuser.py +16 -0
  254. ccai/restclient/github/public/schemas/simplecommit.py +20 -0
  255. ccai/restclient/github/public/schemas/simplecommitstatus.py +22 -0
  256. ccai/restclient/github/public/schemas/simpleinstallation.py +16 -0
  257. ccai/restclient/github/public/schemas/simplerepository.py +60 -0
  258. ccai/restclient/github/public/schemas/statechangeissueevent.py +24 -0
  259. ccai/restclient/github/public/schemas/subissuessummary.py +12 -0
  260. ccai/restclient/github/public/schemas/teamorganization.py +63 -0
  261. ccai/restclient/github/public/schemas/teams.py +202 -0
  262. ccai/restclient/github/public/schemas/timelineassignedissueevent.py +24 -0
  263. ccai/restclient/github/public/schemas/timelinecommentevent.py +30 -0
  264. ccai/restclient/github/public/schemas/timelinecommitcommentedevent.py +18 -0
  265. ccai/restclient/github/public/schemas/timelinecommittedevent.py +25 -0
  266. ccai/restclient/github/public/schemas/timelinecrossreferencedevent.py +19 -0
  267. ccai/restclient/github/public/schemas/timelinelinecommentedevent.py +17 -0
  268. ccai/restclient/github/public/schemas/timelinereviewedevent.py +29 -0
  269. ccai/restclient/github/public/schemas/timelineunassignedissueevent.py +24 -0
  270. ccai/restclient/github/public/schemas/traffic.py +12 -0
  271. ccai/restclient/github/public/schemas/unassignedissueevent.py +25 -0
  272. ccai/restclient/github/public/schemas/unlabeledissueevent.py +24 -0
  273. ccai/restclient/github/public/schemas/users.py +183 -0
  274. ccai/restclient/github/public/schemas/validationerror.py +17 -0
  275. ccai/restclient/github/public/schemas/validationerrorsimple.py +17 -0
  276. ccai/restclient/github/public/schemas/verification.py +16 -0
  277. ccai/restclient/github/public/schemas/vulnerability.py +18 -0
  278. ccai/restclient/github/public/schemas/webhookbranchprotectionconfigurationdisabled.py +15 -0
  279. ccai/restclient/github/public/schemas/webhookbranchprotectionconfigurationenabled.py +15 -0
  280. ccai/restclient/github/public/schemas/webhookbranchprotectionrulecreated.py +16 -0
  281. ccai/restclient/github/public/schemas/webhookbranchprotectionruledeleted.py +16 -0
  282. ccai/restclient/github/public/schemas/webhookbranchprotectionruleedited.py +19 -0
  283. ccai/restclient/github/public/schemas/webhookcheckruncompleted.py +15 -0
  284. ccai/restclient/github/public/schemas/webhookcheckruncompletedformencoded.py +13 -0
  285. ccai/restclient/github/public/schemas/webhookcheckruncreated.py +15 -0
  286. ccai/restclient/github/public/schemas/webhookcheckruncreatedformencoded.py +13 -0
  287. ccai/restclient/github/public/schemas/webhookcheckrunrequestedaction.py +18 -0
  288. ccai/restclient/github/public/schemas/webhookcheckrunrequestedactionformencoded.py +13 -0
  289. ccai/restclient/github/public/schemas/webhookcheckrunrerequested.py +15 -0
  290. ccai/restclient/github/public/schemas/webhookcheckrunrerequestedformencoded.py +13 -0
  291. ccai/restclient/github/public/schemas/webhookchecksuitecompleted.py +18 -0
  292. ccai/restclient/github/public/schemas/webhookchecksuiterequested.py +18 -0
  293. ccai/restclient/github/public/schemas/webhookchecksuitererequested.py +18 -0
  294. ccai/restclient/github/public/schemas/webhookcodescanningalertappearedinbranch.py +20 -0
  295. ccai/restclient/github/public/schemas/webhookcodescanningalertclosedbyuser.py +20 -0
  296. ccai/restclient/github/public/schemas/webhookcodescanningalertcreated.py +20 -0
  297. ccai/restclient/github/public/schemas/webhookcodescanningalertfixed.py +20 -0
  298. ccai/restclient/github/public/schemas/webhookcodescanningalertreopened.py +20 -0
  299. ccai/restclient/github/public/schemas/webhookcodescanningalertreopenedbyuser.py +20 -0
  300. ccai/restclient/github/public/schemas/webhookcommitcommentcreated.py +18 -0
  301. ccai/restclient/github/public/schemas/webhookcreate.py +21 -0
  302. ccai/restclient/github/public/schemas/webhookcustompropertycreated.py +15 -0
  303. ccai/restclient/github/public/schemas/webhookcustompropertydeleted.py +17 -0
  304. ccai/restclient/github/public/schemas/webhookcustompropertypromotedtoenterprise.py +15 -0
  305. ccai/restclient/github/public/schemas/webhookcustompropertyupdated.py +15 -0
  306. ccai/restclient/github/public/schemas/webhookcustompropertyvaluesupdated.py +19 -0
  307. ccai/restclient/github/public/schemas/webhookdelete.py +17 -0
  308. ccai/restclient/github/public/schemas/webhookdependabotalertautodismissed.py +16 -0
  309. ccai/restclient/github/public/schemas/webhookdependabotalertautoreopened.py +16 -0
  310. ccai/restclient/github/public/schemas/webhookdependabotalertcreated.py +16 -0
  311. ccai/restclient/github/public/schemas/webhookdependabotalertdismissed.py +16 -0
  312. ccai/restclient/github/public/schemas/webhookdependabotalertfixed.py +16 -0
  313. ccai/restclient/github/public/schemas/webhookdependabotalertreintroduced.py +16 -0
  314. ccai/restclient/github/public/schemas/webhookdependabotalertreopened.py +16 -0
  315. ccai/restclient/github/public/schemas/webhookdeploykeycreated.py +16 -0
  316. ccai/restclient/github/public/schemas/webhookdeploykeydeleted.py +16 -0
  317. ccai/restclient/github/public/schemas/webhookdeploymentcreated.py +20 -0
  318. ccai/restclient/github/public/schemas/webhookdeploymentprotectionrulerequested.py +21 -0
  319. ccai/restclient/github/public/schemas/webhookdeploymentreviewapproved.py +24 -0
  320. ccai/restclient/github/public/schemas/webhookdeploymentreviewrejected.py +24 -0
  321. ccai/restclient/github/public/schemas/webhookdeploymentreviewrequested.py +23 -0
  322. ccai/restclient/github/public/schemas/webhookdeploymentstatuscreated.py +22 -0
  323. ccai/restclient/github/public/schemas/webhookdiscussionanswered.py +17 -0
  324. ccai/restclient/github/public/schemas/webhookdiscussioncategorychanged.py +19 -0
  325. ccai/restclient/github/public/schemas/webhookdiscussionclosed.py +16 -0
  326. ccai/restclient/github/public/schemas/webhookdiscussioncommentcreated.py +17 -0
  327. ccai/restclient/github/public/schemas/webhookdiscussioncommentdeleted.py +17 -0
  328. ccai/restclient/github/public/schemas/webhookdiscussioncommentedited.py +20 -0
  329. ccai/restclient/github/public/schemas/webhookdiscussioncreated.py +16 -0
  330. ccai/restclient/github/public/schemas/webhookdiscussiondeleted.py +16 -0
  331. ccai/restclient/github/public/schemas/webhookdiscussionedited.py +19 -0
  332. ccai/restclient/github/public/schemas/webhookdiscussionlabeled.py +17 -0
  333. ccai/restclient/github/public/schemas/webhookdiscussionlocked.py +16 -0
  334. ccai/restclient/github/public/schemas/webhookdiscussionpinned.py +16 -0
  335. ccai/restclient/github/public/schemas/webhookdiscussionreopened.py +16 -0
  336. ccai/restclient/github/public/schemas/webhookdiscussiontransferred.py +19 -0
  337. ccai/restclient/github/public/schemas/webhookdiscussionunanswered.py +15 -0
  338. ccai/restclient/github/public/schemas/webhookdiscussionunlabeled.py +17 -0
  339. ccai/restclient/github/public/schemas/webhookdiscussionunlocked.py +16 -0
  340. ccai/restclient/github/public/schemas/webhookdiscussionunpinned.py +16 -0
  341. ccai/restclient/github/public/schemas/webhookfork.py +18 -0
  342. ccai/restclient/github/public/schemas/webhookgithubappauthorizationrevoked.py +11 -0
  343. ccai/restclient/github/public/schemas/webhookgollum.py +17 -0
  344. ccai/restclient/github/public/schemas/webhookinstallationcreated.py +19 -0
  345. ccai/restclient/github/public/schemas/webhookinstallationdeleted.py +19 -0
  346. ccai/restclient/github/public/schemas/webhookinstallationnewpermissionsaccepted.py +19 -0
  347. ccai/restclient/github/public/schemas/webhookinstallationrepositoriesadded.py +21 -0
  348. ccai/restclient/github/public/schemas/webhookinstallationrepositoriesremoved.py +21 -0
  349. ccai/restclient/github/public/schemas/webhookinstallationsuspend.py +19 -0
  350. ccai/restclient/github/public/schemas/webhookinstallationtargetrenamed.py +20 -0
  351. ccai/restclient/github/public/schemas/webhookinstallationunsuspend.py +19 -0
  352. ccai/restclient/github/public/schemas/webhookissuecommentcreated.py +19 -0
  353. ccai/restclient/github/public/schemas/webhookissuecommentdeleted.py +17 -0
  354. ccai/restclient/github/public/schemas/webhookissuecommentedited.py +18 -0
  355. ccai/restclient/github/public/schemas/webhookissuedependenciesblockedbyadded.py +19 -0
  356. ccai/restclient/github/public/schemas/webhookissuedependenciesblockedbyremoved.py +19 -0
  357. ccai/restclient/github/public/schemas/webhookissuedependenciesblockingadded.py +19 -0
  358. ccai/restclient/github/public/schemas/webhookissuedependenciesblockingremoved.py +19 -0
  359. ccai/restclient/github/public/schemas/webhookissuesassigned.py +17 -0
  360. ccai/restclient/github/public/schemas/webhookissuesclosed.py +16 -0
  361. ccai/restclient/github/public/schemas/webhookissuesdeleted.py +18 -0
  362. ccai/restclient/github/public/schemas/webhookissuesdemilestoned.py +19 -0
  363. ccai/restclient/github/public/schemas/webhookissuesedited.py +20 -0
  364. ccai/restclient/github/public/schemas/webhookissueslabeled.py +19 -0
  365. ccai/restclient/github/public/schemas/webhookissueslocked.py +18 -0
  366. ccai/restclient/github/public/schemas/webhookissuesmilestoned.py +19 -0
  367. ccai/restclient/github/public/schemas/webhookissuesopened.py +19 -0
  368. ccai/restclient/github/public/schemas/webhookissuespinned.py +16 -0
  369. ccai/restclient/github/public/schemas/webhookissuesreopened.py +18 -0
  370. ccai/restclient/github/public/schemas/webhookissuestransferred.py +19 -0
  371. ccai/restclient/github/public/schemas/webhookissuestyped.py +17 -0
  372. ccai/restclient/github/public/schemas/webhookissuesunassigned.py +17 -0
  373. ccai/restclient/github/public/schemas/webhookissuesunlabeled.py +17 -0
  374. ccai/restclient/github/public/schemas/webhookissuesunlocked.py +18 -0
  375. ccai/restclient/github/public/schemas/webhookissuesunpinned.py +16 -0
  376. ccai/restclient/github/public/schemas/webhookissuesuntyped.py +17 -0
  377. ccai/restclient/github/public/schemas/webhooklabelcreated.py +16 -0
  378. ccai/restclient/github/public/schemas/webhooklabeldeleted.py +16 -0
  379. ccai/restclient/github/public/schemas/webhooklabeledited.py +19 -0
  380. ccai/restclient/github/public/schemas/webhookmarketplacepurchasecancelled.py +18 -0
  381. ccai/restclient/github/public/schemas/webhookmarketplacepurchasechanged.py +20 -0
  382. ccai/restclient/github/public/schemas/webhookmarketplacepurchasependingchange.py +20 -0
  383. ccai/restclient/github/public/schemas/webhookmarketplacepurchasependingchangecancelled.py +20 -0
  384. ccai/restclient/github/public/schemas/webhookmarketplacepurchasepurchased.py +18 -0
  385. ccai/restclient/github/public/schemas/webhookmemberadded.py +19 -0
  386. ccai/restclient/github/public/schemas/webhookmemberedited.py +19 -0
  387. ccai/restclient/github/public/schemas/webhookmemberremoved.py +16 -0
  388. ccai/restclient/github/public/schemas/webhookmembershipadded.py +20 -0
  389. ccai/restclient/github/public/schemas/webhookmembershipremoved.py +20 -0
  390. ccai/restclient/github/public/schemas/webhookmergegroupchecksrequested.py +15 -0
  391. ccai/restclient/github/public/schemas/webhookmergegroupdestroyed.py +16 -0
  392. ccai/restclient/github/public/schemas/webhookmetadeleted.py +19 -0
  393. ccai/restclient/github/public/schemas/webhookmilestoneclosed.py +16 -0
  394. ccai/restclient/github/public/schemas/webhookmilestonecreated.py +16 -0
  395. ccai/restclient/github/public/schemas/webhookmilestonedeleted.py +16 -0
  396. ccai/restclient/github/public/schemas/webhookmilestoneedited.py +19 -0
  397. ccai/restclient/github/public/schemas/webhookmilestoneopened.py +16 -0
  398. ccai/restclient/github/public/schemas/webhookorganizationdeleted.py +16 -0
  399. ccai/restclient/github/public/schemas/webhookorganizationmemberadded.py +16 -0
  400. ccai/restclient/github/public/schemas/webhookorganizationmemberinvited.py +19 -0
  401. ccai/restclient/github/public/schemas/webhookorganizationmemberremoved.py +16 -0
  402. ccai/restclient/github/public/schemas/webhookorganizationrenamed.py +19 -0
  403. ccai/restclient/github/public/schemas/webhookorgblockblocked.py +16 -0
  404. ccai/restclient/github/public/schemas/webhookorgblockunblocked.py +16 -0
  405. ccai/restclient/github/public/schemas/webhookpackagepublished.py +18 -0
  406. ccai/restclient/github/public/schemas/webhookpackageupdated.py +18 -0
  407. ccai/restclient/github/public/schemas/webhookpagebuild.py +18 -0
  408. ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestapproved.py +15 -0
  409. ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestcancelled.py +15 -0
  410. ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestcreated.py +15 -0
  411. ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestdenied.py +15 -0
  412. ccai/restclient/github/public/schemas/webhookping.py +17 -0
  413. ccai/restclient/github/public/schemas/webhookpingformencoded.py +13 -0
  414. ccai/restclient/github/public/schemas/webhookprojectcardconverted.py +19 -0
  415. ccai/restclient/github/public/schemas/webhookprojectcardcreated.py +16 -0
  416. ccai/restclient/github/public/schemas/webhookprojectcarddeleted.py +18 -0
  417. ccai/restclient/github/public/schemas/webhookprojectcardedited.py +19 -0
  418. ccai/restclient/github/public/schemas/webhookprojectcardmoved.py +19 -0
  419. ccai/restclient/github/public/schemas/webhookprojectclosed.py +16 -0
  420. ccai/restclient/github/public/schemas/webhookprojectcolumncreated.py +16 -0
  421. ccai/restclient/github/public/schemas/webhookprojectcolumndeleted.py +16 -0
  422. ccai/restclient/github/public/schemas/webhookprojectcolumnedited.py +19 -0
  423. ccai/restclient/github/public/schemas/webhookprojectcolumnmoved.py +16 -0
  424. ccai/restclient/github/public/schemas/webhookprojectcreated.py +16 -0
  425. ccai/restclient/github/public/schemas/webhookprojectdeleted.py +16 -0
  426. ccai/restclient/github/public/schemas/webhookprojectedited.py +19 -0
  427. ccai/restclient/github/public/schemas/webhookprojectreopened.py +16 -0
  428. ccai/restclient/github/public/schemas/webhookprojectsv2itemarchived.py +15 -0
  429. ccai/restclient/github/public/schemas/webhookprojectsv2itemconverted.py +17 -0
  430. ccai/restclient/github/public/schemas/webhookprojectsv2itemcreated.py +14 -0
  431. ccai/restclient/github/public/schemas/webhookprojectsv2itemdeleted.py +14 -0
  432. ccai/restclient/github/public/schemas/webhookprojectsv2itemedited.py +17 -0
  433. ccai/restclient/github/public/schemas/webhookprojectsv2itemreordered.py +17 -0
  434. ccai/restclient/github/public/schemas/webhookprojectsv2itemrestored.py +15 -0
  435. ccai/restclient/github/public/schemas/webhookprojectsv2projectclosed.py +14 -0
  436. ccai/restclient/github/public/schemas/webhookprojectsv2projectcreated.py +17 -0
  437. ccai/restclient/github/public/schemas/webhookprojectsv2projectdeleted.py +14 -0
  438. ccai/restclient/github/public/schemas/webhookprojectsv2projectedited.py +17 -0
  439. ccai/restclient/github/public/schemas/webhookprojectsv2projectreopened.py +14 -0
  440. ccai/restclient/github/public/schemas/webhookprojectsv2statusupdatecreated.py +14 -0
  441. ccai/restclient/github/public/schemas/webhookprojectsv2statusupdatedeleted.py +14 -0
  442. ccai/restclient/github/public/schemas/webhookprojectsv2statusupdateedited.py +17 -0
  443. ccai/restclient/github/public/schemas/webhookpublic.py +14 -0
  444. ccai/restclient/github/public/schemas/webhookpullrequestassigned.py +20 -0
  445. ccai/restclient/github/public/schemas/webhookpullrequestautomergedisabled.py +20 -0
  446. ccai/restclient/github/public/schemas/webhookpullrequestautomergeenabled.py +20 -0
  447. ccai/restclient/github/public/schemas/webhookpullrequestclosed.py +17 -0
  448. ccai/restclient/github/public/schemas/webhookpullrequestconvertedtodraft.py +17 -0
  449. ccai/restclient/github/public/schemas/webhookpullrequestdemilestoned.py +17 -0
  450. ccai/restclient/github/public/schemas/webhookpullrequestdequeued.py +20 -0
  451. ccai/restclient/github/public/schemas/webhookpullrequestedited.py +20 -0
  452. ccai/restclient/github/public/schemas/webhookpullrequestenqueued.py +19 -0
  453. ccai/restclient/github/public/schemas/webhookpullrequestlabeled.py +20 -0
  454. ccai/restclient/github/public/schemas/webhookpullrequestlocked.py +19 -0
  455. ccai/restclient/github/public/schemas/webhookpullrequestmilestoned.py +17 -0
  456. ccai/restclient/github/public/schemas/webhookpullrequestopened.py +17 -0
  457. ccai/restclient/github/public/schemas/webhookpullrequestreadyforreview.py +17 -0
  458. ccai/restclient/github/public/schemas/webhookpullrequestreopened.py +17 -0
  459. ccai/restclient/github/public/schemas/webhookpullrequestreviewcommentcreated.py +19 -0
  460. ccai/restclient/github/public/schemas/webhookpullrequestreviewcommentdeleted.py +19 -0
  461. ccai/restclient/github/public/schemas/webhookpullrequestreviewcommentedited.py +20 -0
  462. ccai/restclient/github/public/schemas/webhookpullrequestreviewdismissed.py +19 -0
  463. ccai/restclient/github/public/schemas/webhookpullrequestreviewedited.py +20 -0
  464. ccai/restclient/github/public/schemas/webhookpullrequestreviewsubmitted.py +19 -0
  465. ccai/restclient/github/public/schemas/webhookpullrequestreviewthreadresolved.py +20 -0
  466. ccai/restclient/github/public/schemas/webhookpullrequestreviewthreadunresolved.py +20 -0
  467. ccai/restclient/github/public/schemas/webhookpullrequestsynchronize.py +21 -0
  468. ccai/restclient/github/public/schemas/webhookpullrequestunassigned.py +20 -0
  469. ccai/restclient/github/public/schemas/webhookpullrequestunlabeled.py +20 -0
  470. ccai/restclient/github/public/schemas/webhookpullrequestunlocked.py +19 -0
  471. ccai/restclient/github/public/schemas/webhookpush.py +27 -0
  472. ccai/restclient/github/public/schemas/webhookregistrypackagepublished.py +18 -0
  473. ccai/restclient/github/public/schemas/webhookregistrypackageupdated.py +18 -0
  474. ccai/restclient/github/public/schemas/webhookreleasecreated.py +16 -0
  475. ccai/restclient/github/public/schemas/webhookreleasedeleted.py +16 -0
  476. ccai/restclient/github/public/schemas/webhookreleaseedited.py +19 -0
  477. ccai/restclient/github/public/schemas/webhookreleaseprereleased.py +18 -0
  478. ccai/restclient/github/public/schemas/webhookreleasepublished.py +16 -0
  479. ccai/restclient/github/public/schemas/webhookreleasereleased.py +16 -0
  480. ccai/restclient/github/public/schemas/webhookreleaseunpublished.py +16 -0
  481. ccai/restclient/github/public/schemas/webhookrepositoryadvisorypublished.py +16 -0
  482. ccai/restclient/github/public/schemas/webhookrepositoryadvisoryreported.py +16 -0
  483. ccai/restclient/github/public/schemas/webhookrepositoryarchived.py +15 -0
  484. ccai/restclient/github/public/schemas/webhookrepositorycreated.py +15 -0
  485. ccai/restclient/github/public/schemas/webhookrepositorydeleted.py +15 -0
  486. ccai/restclient/github/public/schemas/webhookrepositorydispatchsample.py +19 -0
  487. ccai/restclient/github/public/schemas/webhookrepositoryedited.py +18 -0
  488. ccai/restclient/github/public/schemas/webhookrepositoryimport.py +15 -0
  489. ccai/restclient/github/public/schemas/webhookrepositoryprivatized.py +15 -0
  490. ccai/restclient/github/public/schemas/webhookrepositorypublicized.py +15 -0
  491. ccai/restclient/github/public/schemas/webhookrepositoryrenamed.py +18 -0
  492. ccai/restclient/github/public/schemas/webhookrepositoryrulesetcreated.py +16 -0
  493. ccai/restclient/github/public/schemas/webhookrepositoryrulesetdeleted.py +16 -0
  494. ccai/restclient/github/public/schemas/webhookrepositoryrulesetedited.py +19 -0
  495. ccai/restclient/github/public/schemas/webhookrepositorytransferred.py +18 -0
  496. ccai/restclient/github/public/schemas/webhookrepositoryunarchived.py +15 -0
  497. ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertcreate.py +16 -0
  498. ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertdismiss.py +18 -0
  499. ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertreopen.py +16 -0
  500. ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertresolve.py +18 -0
  501. ccai/restclient/github/public/schemas/webhookrubygemsmetadata.py +21 -0
  502. ccai/restclient/github/public/schemas/webhooksalert.py +31 -0
  503. ccai/restclient/github/public/schemas/webhooksanswer.py +24 -0
  504. ccai/restclient/github/public/schemas/webhooksapprover.py +28 -0
  505. ccai/restclient/github/public/schemas/webhookschanges.py +15 -0
  506. ccai/restclient/github/public/schemas/webhookschanges8.py +12 -0
  507. ccai/restclient/github/public/schemas/webhookscomment.py +24 -0
  508. ccai/restclient/github/public/schemas/webhooksdeploykey.py +24 -0
  509. ccai/restclient/github/public/schemas/webhooksecretscanningalertcreated.py +16 -0
  510. ccai/restclient/github/public/schemas/webhooksecretscanningalertlocationcreated.py +16 -0
  511. ccai/restclient/github/public/schemas/webhooksecretscanningalertlocationcreatedformencoded.py +10 -0
  512. ccai/restclient/github/public/schemas/webhooksecretscanningalertpubliclyleaked.py +16 -0
  513. ccai/restclient/github/public/schemas/webhooksecretscanningalertreopened.py +16 -0
  514. ccai/restclient/github/public/schemas/webhooksecretscanningalertresolved.py +16 -0
  515. ccai/restclient/github/public/schemas/webhooksecretscanningalertvalidated.py +16 -0
  516. ccai/restclient/github/public/schemas/webhooksecretscanningscancompleted.py +24 -0
  517. ccai/restclient/github/public/schemas/webhooksecurityadvisorypublished.py +16 -0
  518. ccai/restclient/github/public/schemas/webhooksecurityadvisoryupdated.py +16 -0
  519. ccai/restclient/github/public/schemas/webhooksecurityadvisorywithdrawn.py +18 -0
  520. ccai/restclient/github/public/schemas/webhooksecurityandanalysis.py +17 -0
  521. ccai/restclient/github/public/schemas/webhooksissue.py +48 -0
  522. ccai/restclient/github/public/schemas/webhooksissue2.py +48 -0
  523. ccai/restclient/github/public/schemas/webhooksissuecomment.py +26 -0
  524. ccai/restclient/github/public/schemas/webhookslabel.py +18 -0
  525. ccai/restclient/github/public/schemas/webhooksmarketplacepurchase.py +18 -0
  526. ccai/restclient/github/public/schemas/webhooksmembership.py +21 -0
  527. ccai/restclient/github/public/schemas/webhooksmilestone.py +30 -0
  528. ccai/restclient/github/public/schemas/webhooksmilestone3.py +30 -0
  529. ccai/restclient/github/public/schemas/webhooksponsorshipcancelled.py +16 -0
  530. ccai/restclient/github/public/schemas/webhooksponsorshipcreated.py +16 -0
  531. ccai/restclient/github/public/schemas/webhooksponsorshipedited.py +19 -0
  532. ccai/restclient/github/public/schemas/webhooksponsorshippendingcancellation.py +17 -0
  533. ccai/restclient/github/public/schemas/webhooksponsorshippendingtierchange.py +18 -0
  534. ccai/restclient/github/public/schemas/webhooksponsorshiptierchanged.py +17 -0
  535. ccai/restclient/github/public/schemas/webhookspreviousmarketplacepurchase.py +18 -0
  536. ccai/restclient/github/public/schemas/webhooksproject.py +24 -0
  537. ccai/restclient/github/public/schemas/webhooksprojectcard.py +24 -0
  538. ccai/restclient/github/public/schemas/webhooksprojectchanges.py +12 -0
  539. ccai/restclient/github/public/schemas/webhooksprojectcolumn.py +20 -0
  540. ccai/restclient/github/public/schemas/webhookspullrequest5.py +59 -0
  541. ccai/restclient/github/public/schemas/webhooksrelease.py +36 -0
  542. ccai/restclient/github/public/schemas/webhooksrelease1.py +36 -0
  543. ccai/restclient/github/public/schemas/webhooksreview.py +26 -0
  544. ccai/restclient/github/public/schemas/webhooksreviewcomment.py +41 -0
  545. ccai/restclient/github/public/schemas/webhooksrule.py +42 -0
  546. ccai/restclient/github/public/schemas/webhookssecurityadvisory.py +27 -0
  547. ccai/restclient/github/public/schemas/webhookssponsorship.py +18 -0
  548. ccai/restclient/github/public/schemas/webhookstarcreated.py +18 -0
  549. ccai/restclient/github/public/schemas/webhookstardeleted.py +18 -0
  550. ccai/restclient/github/public/schemas/webhookstatus.py +28 -0
  551. ccai/restclient/github/public/schemas/webhooksteam.py +28 -0
  552. ccai/restclient/github/public/schemas/webhooksteam1.py +28 -0
  553. ccai/restclient/github/public/schemas/webhooksubissuesparentissueadded.py +19 -0
  554. ccai/restclient/github/public/schemas/webhooksubissuesparentissueremoved.py +19 -0
  555. ccai/restclient/github/public/schemas/webhooksubissuessubissueadded.py +19 -0
  556. ccai/restclient/github/public/schemas/webhooksubissuessubissueremoved.py +19 -0
  557. ccai/restclient/github/public/schemas/webhooksuser.py +33 -0
  558. ccai/restclient/github/public/schemas/webhooksusermannequin.py +33 -0
  559. ccai/restclient/github/public/schemas/webhooksworkflow.py +19 -0
  560. ccai/restclient/github/public/schemas/webhooksworkflowjobrun.py +19 -0
  561. ccai/restclient/github/public/schemas/webhookteamadd.py +15 -0
  562. ccai/restclient/github/public/schemas/webhookteamaddedtorepository.py +18 -0
  563. ccai/restclient/github/public/schemas/webhookteamcreated.py +18 -0
  564. ccai/restclient/github/public/schemas/webhookteamdeleted.py +18 -0
  565. ccai/restclient/github/public/schemas/webhookteamedited.py +19 -0
  566. ccai/restclient/github/public/schemas/webhookteamremovedfromrepository.py +18 -0
  567. ccai/restclient/github/public/schemas/webhookwatchstarted.py +15 -0
  568. ccai/restclient/github/public/schemas/webhookworkflowdispatch.py +19 -0
  569. ccai/restclient/github/public/schemas/webhookworkflowjobcompleted.py +17 -0
  570. ccai/restclient/github/public/schemas/webhookworkflowjobinprogress.py +17 -0
  571. ccai/restclient/github/public/schemas/webhookworkflowjobqueued.py +19 -0
  572. ccai/restclient/github/public/schemas/webhookworkflowjobwaiting.py +19 -0
  573. ccai/restclient/github/public/schemas/webhookworkflowruncompleted.py +19 -0
  574. ccai/restclient/github/public/schemas/webhookworkflowruninprogress.py +19 -0
  575. ccai/restclient/github/public/schemas/webhookworkflowrunrequested.py +19 -0
  576. codecraftai_restclient_github_public-1.2.0.dist-info/METADATA +87 -0
  577. codecraftai_restclient_github_public-1.2.0.dist-info/RECORD +579 -0
  578. codecraftai_restclient_github_public-1.2.0.dist-info/WHEEL +4 -0
  579. codecraftai_restclient_github_public-1.2.0.dist-info/licenses/LICENSE.md +204 -0
@@ -0,0 +1,1203 @@
1
+ # Auto-generated by RestClientGenerator. DO NOT EDIT.
2
+
3
+ from typing import Any, Dict, List, Optional, Union
4
+
5
+ from ccai.restclient.base.aspectsrest import AspectsRest
6
+ from ccai.restclient.base.pagedlist import PagedList
7
+ from ccai.restclient.base.restapigroup import RestApiGroup
8
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningAlert
9
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningAlertInstance
10
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningAlertItems
11
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningAnalysis
12
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningAnalysisDeletion
13
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningAutofix
14
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningAutofixCommits
15
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningCodeqlDatabase
16
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningDefaultSetup
17
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningDefaultSetupUpdate
18
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningOrganizationAlertItems
19
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningSarifsStatus
20
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningVariantAnalysis
21
+ from ccai.restclient.github.public.schemas.codescanning import CodeScanningVariantAnalysisRepoTask
22
+
23
+
24
+ class CodeScanningApiGroup(RestApiGroup):
25
+ """
26
+ Retrieve code scanning alerts from a repository.
27
+ """
28
+
29
+ def commit_autofix(self, owner: str, repo: str, alert_number: int, body: CodeScanningAutofixCommits, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
30
+ """
31
+ Commit an autofix for a code scanning alert
32
+
33
+ Commits an autofix for a code scanning alert.
34
+
35
+ If an autofix is committed as a result of this request, then this endpoint will return a 201 Created response.
36
+
37
+ OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
38
+ """
39
+ client = self.client
40
+ if aspects is None:
41
+ aspects = client.aspects
42
+
43
+ header_params = client.headers
44
+ if headers is not None:
45
+ header_params = headers
46
+
47
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits"
48
+ path_params = {
49
+ 'owner': owner,
50
+ 'repo': repo,
51
+ 'alert_number': alert_number,
52
+ }
53
+ call_leaf = leaf_template.format(**path_params)
54
+
55
+ query_params = None
56
+
57
+
58
+ if exp_status is None:
59
+ exp_status = [201]
60
+
61
+ resp = client.perform_call(
62
+ leaf=call_leaf,
63
+ method="POST",
64
+ params=query_params if query_params else None,
65
+ body=body,
66
+ exp_status=exp_status,
67
+ headers=header_params if header_params else None,
68
+ context_msg=None,
69
+ aspects=aspects,
70
+ )
71
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
72
+ rtnval = None
73
+ else:
74
+ rtnval = resp.json()
75
+ return rtnval
76
+
77
+ def create_autofix(self, owner: str, repo: str, alert_number: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeScanningAutofix:
78
+ """
79
+ Create an autofix for a code scanning alert
80
+
81
+ Creates an autofix for a code scanning alert.
82
+
83
+ If a new autofix is to be created as a result of this request or is currently being generated, then this endpoint will return a 202 Accepted response.
84
+
85
+ If an autofix already exists for a given alert, then this endpoint will return a 200 OK response.
86
+
87
+ OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
88
+ """
89
+ client = self.client
90
+ if aspects is None:
91
+ aspects = client.aspects
92
+
93
+ header_params = client.headers
94
+ if headers is not None:
95
+ header_params = headers
96
+
97
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix"
98
+ path_params = {
99
+ 'owner': owner,
100
+ 'repo': repo,
101
+ 'alert_number': alert_number,
102
+ }
103
+ call_leaf = leaf_template.format(**path_params)
104
+
105
+ query_params = None
106
+
107
+
108
+ if exp_status is None:
109
+ exp_status = [200, 202]
110
+
111
+ resp = client.perform_call(
112
+ leaf=call_leaf,
113
+ method="POST",
114
+ params=query_params if query_params else None,
115
+ body=None,
116
+ exp_status=exp_status,
117
+ headers=header_params if header_params else None,
118
+ context_msg=None,
119
+ aspects=aspects,
120
+ )
121
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
122
+ rtnobj = None
123
+ else:
124
+ raw_data = resp.json()
125
+ rtnobj = CodeScanningAutofix.from_dict(raw_data)
126
+ return rtnobj
127
+
128
+ def create_variant_analysis(self, owner: str, repo: str, body: Union[str, str, str], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
129
+ """
130
+ Create a CodeQL variant analysis
131
+
132
+ Creates a new CodeQL variant analysis, which will run a CodeQL query against one or more repositories.
133
+
134
+ Get started by learning more about [running CodeQL queries at scale with Multi-Repository Variant Analysis](https://docs.github.com/code-security/codeql-for-vs-code/getting-started-with-codeql-for-vs-code/running-codeql-queries-at-scale-with-multi-repository-variant-analysis).
135
+
136
+ Use the `owner` and `repo` parameters in the URL to specify the controller repository that
137
+ will be used for running GitHub Actions workflows and storing the results of the CodeQL variant analysis.
138
+
139
+ OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
140
+ """
141
+ client = self.client
142
+ if aspects is None:
143
+ aspects = client.aspects
144
+
145
+ header_params = client.headers
146
+ if headers is not None:
147
+ header_params = headers
148
+
149
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/codeql/variant-analyses"
150
+ path_params = {
151
+ 'owner': owner,
152
+ 'repo': repo,
153
+ }
154
+ call_leaf = leaf_template.format(**path_params)
155
+
156
+ query_params = None
157
+
158
+
159
+ if exp_status is None:
160
+ exp_status = [201]
161
+
162
+ resp = client.perform_call(
163
+ leaf=call_leaf,
164
+ method="POST",
165
+ params=query_params if query_params else None,
166
+ body=body,
167
+ exp_status=exp_status,
168
+ headers=header_params if header_params else None,
169
+ context_msg=None,
170
+ aspects=aspects,
171
+ )
172
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
173
+ rtnval = None
174
+ else:
175
+ rtnval = resp.json()
176
+ return rtnval
177
+
178
+ def delete_analysis(self, owner: str, repo: str, analysis_id: int, *, confirm_delete: Optional[Optional[str]] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeScanningAnalysisDeletion:
179
+ """
180
+ Delete a code scanning analysis from a repository
181
+
182
+ Deletes a specified code scanning analysis from a repository.
183
+
184
+ You can delete one analysis at a time.
185
+ To delete a series of analyses, start with the most recent analysis and work backwards.
186
+ Conceptually, the process is similar to the undo function in a text editor.
187
+
188
+ When you list the analyses for a repository,
189
+ one or more will be identified as deletable in the response:
190
+
191
+ ```
192
+ "deletable": true
193
+ ```
194
+
195
+ An analysis is deletable when it's the most recent in a set of analyses.
196
+ Typically, a repository will have multiple sets of analyses
197
+ for each enabled code scanning tool,
198
+ where a set is determined by a unique combination of analysis values:
199
+
200
+ * `ref`
201
+ * `tool`
202
+ * `category`
203
+
204
+ If you attempt to delete an analysis that is not the most recent in a set,
205
+ you'll get a 400 response with the message:
206
+
207
+ ```
208
+ Analysis specified is not deletable.
209
+ ```
210
+
211
+ The response from a successful `DELETE` operation provides you with
212
+ two alternative URLs for deleting the next analysis in the set:
213
+ `next_analysis_url` and `confirm_delete_url`.
214
+ Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis
215
+ in a set. This is a useful option if you want to preserve at least one analysis
216
+ for the specified tool in your repository.
217
+ Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool.
218
+ When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`
219
+ in the 200 response is `null`.
220
+
221
+ As an example of the deletion process,
222
+ let's imagine that you added a workflow that configured a particular code scanning tool
223
+ to analyze the code in a repository. This tool has added 15 analyses:
224
+ 10 on the default branch, and another 5 on a topic branch.
225
+ You therefore have two separate sets of analyses for this tool.
226
+ You've now decided that you want to remove all of the analyses for the tool.
227
+ To do this you must make 15 separate deletion requests.
228
+ To start, you must find an analysis that's identified as deletable.
229
+ Each set of analyses always has one that's identified as deletable.
230
+ Having found the deletable analysis for one of the two sets,
231
+ delete this analysis and then continue deleting the next analysis in the set until they're all deleted.
232
+ Then repeat the process for the second set.
233
+ The procedure therefore consists of a nested loop:
234
+
235
+ **Outer loop**:
236
+ * List the analyses for the repository, filtered by tool.
237
+ * Parse this list to find a deletable analysis. If found:
238
+
239
+ **Inner loop**:
240
+ * Delete the identified analysis.
241
+ * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.
242
+
243
+ The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.
244
+
245
+ OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
246
+ """
247
+ client = self.client
248
+ if aspects is None:
249
+ aspects = client.aspects
250
+
251
+ header_params = client.headers
252
+ if headers is not None:
253
+ header_params = headers
254
+
255
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"
256
+ path_params = {
257
+ 'owner': owner,
258
+ 'repo': repo,
259
+ 'analysis_id': analysis_id,
260
+ }
261
+ call_leaf = leaf_template.format(**path_params)
262
+
263
+ query_params = {}
264
+ if confirm_delete is not None:
265
+ query_params['confirm_delete'] = confirm_delete
266
+
267
+
268
+ if exp_status is None:
269
+ exp_status = [200]
270
+
271
+ resp = client.perform_call(
272
+ leaf=call_leaf,
273
+ method="DELETE",
274
+ params=query_params if query_params else None,
275
+ body=None,
276
+ exp_status=exp_status,
277
+ headers=header_params if header_params else None,
278
+ context_msg=None,
279
+ aspects=aspects,
280
+ )
281
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
282
+ rtnobj = None
283
+ else:
284
+ raw_data = resp.json()
285
+ rtnobj = CodeScanningAnalysisDeletion.from_dict(raw_data)
286
+ return rtnobj
287
+
288
+ def delete_codeql_database(self, owner: str, repo: str, language: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
289
+ """
290
+ Delete a CodeQL database
291
+
292
+ Deletes a CodeQL database for a language in a repository.
293
+
294
+ OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
295
+ """
296
+ client = self.client
297
+ if aspects is None:
298
+ aspects = client.aspects
299
+
300
+ header_params = client.headers
301
+ if headers is not None:
302
+ header_params = headers
303
+
304
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
305
+ path_params = {
306
+ 'owner': owner,
307
+ 'repo': repo,
308
+ 'language': language,
309
+ }
310
+ call_leaf = leaf_template.format(**path_params)
311
+
312
+ query_params = None
313
+
314
+
315
+ if exp_status is None:
316
+ exp_status = [204]
317
+
318
+ resp = client.perform_call(
319
+ leaf=call_leaf,
320
+ method="DELETE",
321
+ params=query_params if query_params else None,
322
+ body=None,
323
+ exp_status=exp_status,
324
+ headers=header_params if header_params else None,
325
+ context_msg=None,
326
+ aspects=aspects,
327
+ )
328
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
329
+ rtnval = None
330
+ else:
331
+ rtnval = resp.json()
332
+ return rtnval
333
+
334
+ def get_alert(self, owner: str, repo: str, alert_number: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeScanningAlert:
335
+ """
336
+ Get a code scanning alert
337
+
338
+ Gets a single code scanning alert.
339
+
340
+ OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
341
+ """
342
+ client = self.client
343
+ if aspects is None:
344
+ aspects = client.aspects
345
+
346
+ header_params = client.headers
347
+ if headers is not None:
348
+ header_params = headers
349
+
350
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"
351
+ path_params = {
352
+ 'owner': owner,
353
+ 'repo': repo,
354
+ 'alert_number': alert_number,
355
+ }
356
+ call_leaf = leaf_template.format(**path_params)
357
+
358
+ query_params = None
359
+
360
+
361
+ if exp_status is None:
362
+ exp_status = [200]
363
+
364
+ resp = client.perform_call(
365
+ leaf=call_leaf,
366
+ method="GET",
367
+ params=query_params if query_params else None,
368
+ body=None,
369
+ exp_status=exp_status,
370
+ headers=header_params if header_params else None,
371
+ context_msg=None,
372
+ aspects=aspects,
373
+ )
374
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
375
+ rtnobj = None
376
+ else:
377
+ raw_data = resp.json()
378
+ rtnobj = CodeScanningAlert.from_dict(raw_data)
379
+ return rtnobj
380
+
381
+ def get_analysis(self, owner: str, repo: str, analysis_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeScanningAnalysis:
382
+ """
383
+ Get a code scanning analysis for a repository
384
+
385
+ Gets a specified code scanning analysis for a repository.
386
+
387
+ The default JSON response contains fields that describe the analysis.
388
+ This includes the Git reference and commit SHA to which the analysis relates,
389
+ the datetime of the analysis, the name of the code scanning tool,
390
+ and the number of alerts.
391
+
392
+ The `rules_count` field in the default response give the number of rules
393
+ that were run in the analysis.
394
+ For very old analyses this data is not available,
395
+ and `0` is returned in this field.
396
+
397
+ This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
398
+
399
+ - **`application/sarif+json`**: Instead of returning a summary of the analysis, this endpoint returns a subset of the analysis data that was uploaded. The data is formatted as [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). It also returns additional data such as the `github/alertNumber` and `github/alertUrl` properties.
400
+
401
+ OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
402
+ """
403
+ client = self.client
404
+ if aspects is None:
405
+ aspects = client.aspects
406
+
407
+ header_params = client.headers
408
+ if headers is not None:
409
+ header_params = headers
410
+
411
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"
412
+ path_params = {
413
+ 'owner': owner,
414
+ 'repo': repo,
415
+ 'analysis_id': analysis_id,
416
+ }
417
+ call_leaf = leaf_template.format(**path_params)
418
+
419
+ query_params = None
420
+
421
+
422
+ if exp_status is None:
423
+ exp_status = [200]
424
+
425
+ resp = client.perform_call(
426
+ leaf=call_leaf,
427
+ method="GET",
428
+ params=query_params if query_params else None,
429
+ body=None,
430
+ exp_status=exp_status,
431
+ headers=header_params if header_params else None,
432
+ context_msg=None,
433
+ aspects=aspects,
434
+ )
435
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
436
+ rtnobj = None
437
+ else:
438
+ raw_data = resp.json()
439
+ rtnobj = CodeScanningAnalysis.from_dict(raw_data)
440
+ return rtnobj
441
+
442
+ def get_autofix(self, owner: str, repo: str, alert_number: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeScanningAutofix:
443
+ """
444
+ Get the status of an autofix for a code scanning alert
445
+
446
+ Gets the status and description of an autofix for a code scanning alert.
447
+
448
+ OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
449
+ """
450
+ client = self.client
451
+ if aspects is None:
452
+ aspects = client.aspects
453
+
454
+ header_params = client.headers
455
+ if headers is not None:
456
+ header_params = headers
457
+
458
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix"
459
+ path_params = {
460
+ 'owner': owner,
461
+ 'repo': repo,
462
+ 'alert_number': alert_number,
463
+ }
464
+ call_leaf = leaf_template.format(**path_params)
465
+
466
+ query_params = None
467
+
468
+
469
+ if exp_status is None:
470
+ exp_status = [200]
471
+
472
+ resp = client.perform_call(
473
+ leaf=call_leaf,
474
+ method="GET",
475
+ params=query_params if query_params else None,
476
+ body=None,
477
+ exp_status=exp_status,
478
+ headers=header_params if header_params else None,
479
+ context_msg=None,
480
+ aspects=aspects,
481
+ )
482
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
483
+ rtnobj = None
484
+ else:
485
+ raw_data = resp.json()
486
+ rtnobj = CodeScanningAutofix.from_dict(raw_data)
487
+ return rtnobj
488
+
489
+ def get_codeql_database(self, owner: str, repo: str, language: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeScanningCodeqlDatabase:
490
+ """
491
+ Get a CodeQL database for a repository
492
+
493
+ Gets a CodeQL database for a language in a repository.
494
+
495
+ By default this endpoint returns JSON metadata about the CodeQL database. To
496
+ download the CodeQL database binary content, set the `Accept` header of the request
497
+ to [`application/zip`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types), and make sure
498
+ your HTTP client is configured to follow redirects or use the `Location` header
499
+ to make a second request to get the redirect URL.
500
+
501
+ OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
502
+ """
503
+ client = self.client
504
+ if aspects is None:
505
+ aspects = client.aspects
506
+
507
+ header_params = client.headers
508
+ if headers is not None:
509
+ header_params = headers
510
+
511
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
512
+ path_params = {
513
+ 'owner': owner,
514
+ 'repo': repo,
515
+ 'language': language,
516
+ }
517
+ call_leaf = leaf_template.format(**path_params)
518
+
519
+ query_params = None
520
+
521
+
522
+ if exp_status is None:
523
+ exp_status = [200]
524
+
525
+ resp = client.perform_call(
526
+ leaf=call_leaf,
527
+ method="GET",
528
+ params=query_params if query_params else None,
529
+ body=None,
530
+ exp_status=exp_status,
531
+ headers=header_params if header_params else None,
532
+ context_msg=None,
533
+ aspects=aspects,
534
+ )
535
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
536
+ rtnobj = None
537
+ else:
538
+ raw_data = resp.json()
539
+ rtnobj = CodeScanningCodeqlDatabase.from_dict(raw_data)
540
+ return rtnobj
541
+
542
+ def get_default_setup(self, owner: str, repo: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeScanningDefaultSetup:
543
+ """
544
+ Get a code scanning default setup configuration
545
+
546
+ Gets a code scanning default setup configuration.
547
+
548
+ OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
549
+ """
550
+ client = self.client
551
+ if aspects is None:
552
+ aspects = client.aspects
553
+
554
+ header_params = client.headers
555
+ if headers is not None:
556
+ header_params = headers
557
+
558
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/default-setup"
559
+ path_params = {
560
+ 'owner': owner,
561
+ 'repo': repo,
562
+ }
563
+ call_leaf = leaf_template.format(**path_params)
564
+
565
+ query_params = None
566
+
567
+
568
+ if exp_status is None:
569
+ exp_status = [200]
570
+
571
+ resp = client.perform_call(
572
+ leaf=call_leaf,
573
+ method="GET",
574
+ params=query_params if query_params else None,
575
+ body=None,
576
+ exp_status=exp_status,
577
+ headers=header_params if header_params else None,
578
+ context_msg=None,
579
+ aspects=aspects,
580
+ )
581
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
582
+ rtnobj = None
583
+ else:
584
+ raw_data = resp.json()
585
+ rtnobj = CodeScanningDefaultSetup.from_dict(raw_data)
586
+ return rtnobj
587
+
588
+ def get_sarif(self, owner: str, repo: str, sarif_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeScanningSarifsStatus:
589
+ """
590
+ Get information about a SARIF upload
591
+
592
+ Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/code-scanning/code-scanning#get-a-code-scanning-analysis-for-a-repository)."
593
+ OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
594
+ """
595
+ client = self.client
596
+ if aspects is None:
597
+ aspects = client.aspects
598
+
599
+ header_params = client.headers
600
+ if headers is not None:
601
+ header_params = headers
602
+
603
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"
604
+ path_params = {
605
+ 'owner': owner,
606
+ 'repo': repo,
607
+ 'sarif_id': sarif_id,
608
+ }
609
+ call_leaf = leaf_template.format(**path_params)
610
+
611
+ query_params = None
612
+
613
+
614
+ if exp_status is None:
615
+ exp_status = [200]
616
+
617
+ resp = client.perform_call(
618
+ leaf=call_leaf,
619
+ method="GET",
620
+ params=query_params if query_params else None,
621
+ body=None,
622
+ exp_status=exp_status,
623
+ headers=header_params if header_params else None,
624
+ context_msg=None,
625
+ aspects=aspects,
626
+ )
627
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
628
+ rtnobj = None
629
+ else:
630
+ raw_data = resp.json()
631
+ rtnobj = CodeScanningSarifsStatus.from_dict(raw_data)
632
+ return rtnobj
633
+
634
+ def get_variant_analysis(self, owner: str, repo: str, codeql_variant_analysis_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeScanningVariantAnalysis:
635
+ """
636
+ Get the summary of a CodeQL variant analysis
637
+
638
+ Gets the summary of a CodeQL variant analysis.
639
+
640
+ OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
641
+ """
642
+ client = self.client
643
+ if aspects is None:
644
+ aspects = client.aspects
645
+
646
+ header_params = client.headers
647
+ if headers is not None:
648
+ header_params = headers
649
+
650
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}"
651
+ path_params = {
652
+ 'owner': owner,
653
+ 'repo': repo,
654
+ 'codeql_variant_analysis_id': codeql_variant_analysis_id,
655
+ }
656
+ call_leaf = leaf_template.format(**path_params)
657
+
658
+ query_params = None
659
+
660
+
661
+ if exp_status is None:
662
+ exp_status = [200]
663
+
664
+ resp = client.perform_call(
665
+ leaf=call_leaf,
666
+ method="GET",
667
+ params=query_params if query_params else None,
668
+ body=None,
669
+ exp_status=exp_status,
670
+ headers=header_params if header_params else None,
671
+ context_msg=None,
672
+ aspects=aspects,
673
+ )
674
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
675
+ rtnobj = None
676
+ else:
677
+ raw_data = resp.json()
678
+ rtnobj = CodeScanningVariantAnalysis.from_dict(raw_data)
679
+ return rtnobj
680
+
681
+ def get_variant_analysis_repo_task(self, owner: str, repo: str, codeql_variant_analysis_id: int, repo_owner: str, repo_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeScanningVariantAnalysisRepoTask:
682
+ """
683
+ Get the analysis status of a repository in a CodeQL variant analysis
684
+
685
+ Gets the analysis status of a repository in a CodeQL variant analysis.
686
+
687
+ OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
688
+ """
689
+ client = self.client
690
+ if aspects is None:
691
+ aspects = client.aspects
692
+
693
+ header_params = client.headers
694
+ if headers is not None:
695
+ header_params = headers
696
+
697
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}"
698
+ path_params = {
699
+ 'owner': owner,
700
+ 'repo': repo,
701
+ 'codeql_variant_analysis_id': codeql_variant_analysis_id,
702
+ 'repo_owner': repo_owner,
703
+ 'repo_name': repo_name,
704
+ }
705
+ call_leaf = leaf_template.format(**path_params)
706
+
707
+ query_params = None
708
+
709
+
710
+ if exp_status is None:
711
+ exp_status = [200]
712
+
713
+ resp = client.perform_call(
714
+ leaf=call_leaf,
715
+ method="GET",
716
+ params=query_params if query_params else None,
717
+ body=None,
718
+ exp_status=exp_status,
719
+ headers=header_params if header_params else None,
720
+ context_msg=None,
721
+ aspects=aspects,
722
+ )
723
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
724
+ rtnobj = None
725
+ else:
726
+ raw_data = resp.json()
727
+ rtnobj = CodeScanningVariantAnalysisRepoTask.from_dict(raw_data)
728
+ return rtnobj
729
+
730
+ def list_alert_instances(self, owner: str, repo: str, alert_number: int, *, page: Optional[int] = 1, per_page: Optional[int] = 30, ref: Optional[str] = None, pr: Optional[int] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[CodeScanningAlertInstance]:
731
+ """
732
+ List instances of a code scanning alert
733
+
734
+ Lists all instances of the specified code scanning alert.
735
+
736
+ OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
737
+ """
738
+ client = self.client
739
+ if aspects is None:
740
+ aspects = client.aspects
741
+
742
+ header_params = client.headers
743
+ if headers is not None:
744
+ header_params = headers
745
+
746
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"
747
+ path_params = {
748
+ 'owner': owner,
749
+ 'repo': repo,
750
+ 'alert_number': alert_number,
751
+ }
752
+ call_leaf = leaf_template.format(**path_params)
753
+
754
+ query_params = {}
755
+ if page is not None:
756
+ query_params['page'] = page
757
+ if per_page is not None:
758
+ query_params['per_page'] = per_page
759
+ if ref is not None:
760
+ query_params['ref'] = ref
761
+ if pr is not None:
762
+ query_params['pr'] = pr
763
+
764
+
765
+ if exp_status is None:
766
+ exp_status = [200]
767
+
768
+ resp = client.perform_call(
769
+ leaf=call_leaf,
770
+ method="GET",
771
+ params=query_params if query_params else None,
772
+ body=None,
773
+ exp_status=exp_status,
774
+ headers=header_params if header_params else None,
775
+ context_msg=None,
776
+ aspects=aspects,
777
+ )
778
+ raw_data = resp.json()
779
+ items = [self._parse_item(item, CodeScanningAlertInstance) for item in raw_data]
780
+ rtnval = PagedList[CodeScanningAlertInstance](items, dict(resp.headers), raw_data)
781
+ return rtnval
782
+
783
+ def list_alerts_for_org(self, org: str, *, tool_name: Optional[str] = None, tool_guid: Optional[Optional[str]] = None, before: Optional[str] = None, after: Optional[str] = None, page: Optional[int] = 1, per_page: Optional[int] = 30, direction: Optional[str] = "desc", state: Optional[str] = None, sort: Optional[str] = "created", severity: Optional[str] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[CodeScanningOrganizationAlertItems]:
784
+ """
785
+ List code scanning alerts for an organization
786
+
787
+ Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
788
+
789
+ The authenticated user must be an owner or security manager for the organization to use this endpoint.
790
+
791
+ OAuth app tokens and personal access tokens (classic) need the `security_events` or `repo`s cope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
792
+ """
793
+ client = self.client
794
+ if aspects is None:
795
+ aspects = client.aspects
796
+
797
+ header_params = client.headers
798
+ if headers is not None:
799
+ header_params = headers
800
+
801
+ leaf_template = "/orgs/{org}/code-scanning/alerts"
802
+ path_params = {
803
+ 'org': org,
804
+ }
805
+ call_leaf = leaf_template.format(**path_params)
806
+
807
+ query_params = {}
808
+ if tool_name is not None:
809
+ query_params['tool_name'] = tool_name
810
+ if tool_guid is not None:
811
+ query_params['tool_guid'] = tool_guid
812
+ if before is not None:
813
+ query_params['before'] = before
814
+ if after is not None:
815
+ query_params['after'] = after
816
+ if page is not None:
817
+ query_params['page'] = page
818
+ if per_page is not None:
819
+ query_params['per_page'] = per_page
820
+ if direction is not None:
821
+ query_params['direction'] = direction
822
+ if state is not None:
823
+ query_params['state'] = state
824
+ if sort is not None:
825
+ query_params['sort'] = sort
826
+ if severity is not None:
827
+ query_params['severity'] = severity
828
+
829
+
830
+ if exp_status is None:
831
+ exp_status = [200]
832
+
833
+ resp = client.perform_call(
834
+ leaf=call_leaf,
835
+ method="GET",
836
+ params=query_params if query_params else None,
837
+ body=None,
838
+ exp_status=exp_status,
839
+ headers=header_params if header_params else None,
840
+ context_msg=None,
841
+ aspects=aspects,
842
+ )
843
+ raw_data = resp.json()
844
+ items = [self._parse_item(item, CodeScanningOrganizationAlertItems) for item in raw_data]
845
+ rtnval = PagedList[CodeScanningOrganizationAlertItems](items, dict(resp.headers), raw_data)
846
+ return rtnval
847
+
848
+ def list_alerts_for_repo(self, owner: str, repo: str, *, tool_name: Optional[str] = None, tool_guid: Optional[Optional[str]] = None, page: Optional[int] = 1, per_page: Optional[int] = 30, ref: Optional[str] = None, pr: Optional[int] = None, direction: Optional[str] = "desc", before: Optional[str] = None, after: Optional[str] = None, sort: Optional[str] = "created", state: Optional[str] = None, severity: Optional[str] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[CodeScanningAlertItems]:
849
+ """
850
+ List code scanning alerts for a repository
851
+
852
+ Lists code scanning alerts.
853
+
854
+ The response includes a `most_recent_instance` object.
855
+ This provides details of the most recent instance of this alert
856
+ for the default branch (or for the specified Git reference if you used `ref` in the request).
857
+
858
+ OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
859
+ """
860
+ client = self.client
861
+ if aspects is None:
862
+ aspects = client.aspects
863
+
864
+ header_params = client.headers
865
+ if headers is not None:
866
+ header_params = headers
867
+
868
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/alerts"
869
+ path_params = {
870
+ 'owner': owner,
871
+ 'repo': repo,
872
+ }
873
+ call_leaf = leaf_template.format(**path_params)
874
+
875
+ query_params = {}
876
+ if tool_name is not None:
877
+ query_params['tool_name'] = tool_name
878
+ if tool_guid is not None:
879
+ query_params['tool_guid'] = tool_guid
880
+ if page is not None:
881
+ query_params['page'] = page
882
+ if per_page is not None:
883
+ query_params['per_page'] = per_page
884
+ if ref is not None:
885
+ query_params['ref'] = ref
886
+ if pr is not None:
887
+ query_params['pr'] = pr
888
+ if direction is not None:
889
+ query_params['direction'] = direction
890
+ if before is not None:
891
+ query_params['before'] = before
892
+ if after is not None:
893
+ query_params['after'] = after
894
+ if sort is not None:
895
+ query_params['sort'] = sort
896
+ if state is not None:
897
+ query_params['state'] = state
898
+ if severity is not None:
899
+ query_params['severity'] = severity
900
+
901
+
902
+ if exp_status is None:
903
+ exp_status = [200]
904
+
905
+ resp = client.perform_call(
906
+ leaf=call_leaf,
907
+ method="GET",
908
+ params=query_params if query_params else None,
909
+ body=None,
910
+ exp_status=exp_status,
911
+ headers=header_params if header_params else None,
912
+ context_msg=None,
913
+ aspects=aspects,
914
+ )
915
+ raw_data = resp.json()
916
+ items = [self._parse_item(item, CodeScanningAlertItems) for item in raw_data]
917
+ rtnval = PagedList[CodeScanningAlertItems](items, dict(resp.headers), raw_data)
918
+ return rtnval
919
+
920
+ def list_codeql_databases(self, owner: str, repo: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> List[CodeScanningCodeqlDatabase]:
921
+ """
922
+ List CodeQL databases for a repository
923
+
924
+ Lists the CodeQL databases that are available in a repository.
925
+
926
+ OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
927
+ """
928
+ client = self.client
929
+ if aspects is None:
930
+ aspects = client.aspects
931
+
932
+ header_params = client.headers
933
+ if headers is not None:
934
+ header_params = headers
935
+
936
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/codeql/databases"
937
+ path_params = {
938
+ 'owner': owner,
939
+ 'repo': repo,
940
+ }
941
+ call_leaf = leaf_template.format(**path_params)
942
+
943
+ query_params = None
944
+
945
+
946
+ if exp_status is None:
947
+ exp_status = [200]
948
+
949
+ resp = client.perform_call(
950
+ leaf=call_leaf,
951
+ method="GET",
952
+ params=query_params if query_params else None,
953
+ body=None,
954
+ exp_status=exp_status,
955
+ headers=header_params if header_params else None,
956
+ context_msg=None,
957
+ aspects=aspects,
958
+ )
959
+ raw_data = resp.json()
960
+ items = [self._parse_item(item, CodeScanningCodeqlDatabase) for item in raw_data]
961
+ return items
962
+
963
+ def list_recent_analyses(self, owner: str, repo: str, *, tool_name: Optional[str] = None, tool_guid: Optional[Optional[str]] = None, page: Optional[int] = 1, per_page: Optional[int] = 30, pr: Optional[int] = None, ref: Optional[str] = None, sarif_id: Optional[str] = None, direction: Optional[str] = "desc", sort: Optional[str] = "created", exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[CodeScanningAnalysis]:
964
+ """
965
+ List code scanning analyses for a repository
966
+
967
+ Lists the details of all code scanning analyses for a repository,
968
+ starting with the most recent.
969
+ The response is paginated and you can use the `page` and `per_page` parameters
970
+ to list the analyses you're interested in.
971
+ By default 30 analyses are listed per page.
972
+
973
+ The `rules_count` field in the response give the number of rules
974
+ that were run in the analysis.
975
+ For very old analyses this data is not available,
976
+ and `0` is returned in this field.
977
+
978
+ > [!WARNING]
979
+ > **Closing down notice:** The `tool_name` field is closing down and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.
980
+
981
+ OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
982
+ """
983
+ client = self.client
984
+ if aspects is None:
985
+ aspects = client.aspects
986
+
987
+ header_params = client.headers
988
+ if headers is not None:
989
+ header_params = headers
990
+
991
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/analyses"
992
+ path_params = {
993
+ 'owner': owner,
994
+ 'repo': repo,
995
+ }
996
+ call_leaf = leaf_template.format(**path_params)
997
+
998
+ query_params = {}
999
+ if tool_name is not None:
1000
+ query_params['tool_name'] = tool_name
1001
+ if tool_guid is not None:
1002
+ query_params['tool_guid'] = tool_guid
1003
+ if page is not None:
1004
+ query_params['page'] = page
1005
+ if per_page is not None:
1006
+ query_params['per_page'] = per_page
1007
+ if pr is not None:
1008
+ query_params['pr'] = pr
1009
+ if ref is not None:
1010
+ query_params['ref'] = ref
1011
+ if sarif_id is not None:
1012
+ query_params['sarif_id'] = sarif_id
1013
+ if direction is not None:
1014
+ query_params['direction'] = direction
1015
+ if sort is not None:
1016
+ query_params['sort'] = sort
1017
+
1018
+
1019
+ if exp_status is None:
1020
+ exp_status = [200]
1021
+
1022
+ resp = client.perform_call(
1023
+ leaf=call_leaf,
1024
+ method="GET",
1025
+ params=query_params if query_params else None,
1026
+ body=None,
1027
+ exp_status=exp_status,
1028
+ headers=header_params if header_params else None,
1029
+ context_msg=None,
1030
+ aspects=aspects,
1031
+ )
1032
+ raw_data = resp.json()
1033
+ items = [self._parse_item(item, CodeScanningAnalysis) for item in raw_data]
1034
+ rtnval = PagedList[CodeScanningAnalysis](items, dict(resp.headers), raw_data)
1035
+ return rtnval
1036
+
1037
+ def update_alert(self, owner: str, repo: str, alert_number: int, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodeScanningAlert:
1038
+ """
1039
+ Update a code scanning alert
1040
+
1041
+ Updates the status of a single code scanning alert.
1042
+ OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
1043
+ """
1044
+ client = self.client
1045
+ if aspects is None:
1046
+ aspects = client.aspects
1047
+
1048
+ header_params = client.headers
1049
+ if headers is not None:
1050
+ header_params = headers
1051
+
1052
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"
1053
+ path_params = {
1054
+ 'owner': owner,
1055
+ 'repo': repo,
1056
+ 'alert_number': alert_number,
1057
+ }
1058
+ call_leaf = leaf_template.format(**path_params)
1059
+
1060
+ query_params = None
1061
+
1062
+
1063
+ if exp_status is None:
1064
+ exp_status = [200]
1065
+
1066
+ resp = client.perform_call(
1067
+ leaf=call_leaf,
1068
+ method="PATCH",
1069
+ params=query_params if query_params else None,
1070
+ body=body,
1071
+ exp_status=exp_status,
1072
+ headers=header_params if header_params else None,
1073
+ context_msg=None,
1074
+ aspects=aspects,
1075
+ )
1076
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
1077
+ rtnobj = None
1078
+ else:
1079
+ raw_data = resp.json()
1080
+ rtnobj = CodeScanningAlert.from_dict(raw_data)
1081
+ return rtnobj
1082
+
1083
+ def update_default_setup(self, owner: str, repo: str, body: CodeScanningDefaultSetupUpdate, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
1084
+ """
1085
+ Update a code scanning default setup configuration
1086
+
1087
+ Updates a code scanning default setup configuration.
1088
+
1089
+ OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
1090
+ """
1091
+ client = self.client
1092
+ if aspects is None:
1093
+ aspects = client.aspects
1094
+
1095
+ header_params = client.headers
1096
+ if headers is not None:
1097
+ header_params = headers
1098
+
1099
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/default-setup"
1100
+ path_params = {
1101
+ 'owner': owner,
1102
+ 'repo': repo,
1103
+ }
1104
+ call_leaf = leaf_template.format(**path_params)
1105
+
1106
+ query_params = None
1107
+
1108
+
1109
+ if exp_status is None:
1110
+ exp_status = [200, 202]
1111
+
1112
+ resp = client.perform_call(
1113
+ leaf=call_leaf,
1114
+ method="PATCH",
1115
+ params=query_params if query_params else None,
1116
+ body=body,
1117
+ exp_status=exp_status,
1118
+ headers=header_params if header_params else None,
1119
+ context_msg=None,
1120
+ aspects=aspects,
1121
+ )
1122
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
1123
+ rtnobj = None
1124
+ else:
1125
+ raw_data = resp.json()
1126
+ rtnobj = Dict[str, Any].from_dict(raw_data)
1127
+ return rtnobj
1128
+
1129
+ def upload_sarif(self, owner: str, repo: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
1130
+ """
1131
+ Upload an analysis as SARIF data
1132
+
1133
+ Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. For troubleshooting information, see "[Troubleshooting SARIF uploads](https://docs.github.com/code-security/code-scanning/troubleshooting-sarif)."
1134
+
1135
+ There are two places where you can upload code scanning results.
1136
+ - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
1137
+ - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)."
1138
+
1139
+ You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example:
1140
+
1141
+ ```
1142
+ gzip -c analysis-data.sarif | base64 -w0
1143
+ ```
1144
+
1145
+ SARIF upload supports a maximum number of entries per the following data objects, and an analysis will be rejected if any of these objects is above its maximum value. For some objects, there are additional values over which the entries will be ignored while keeping the most important entries whenever applicable.
1146
+ To get the most out of your analysis when it includes data above the supported limits, try to optimize the analysis configuration. For example, for the CodeQL tool, identify and remove the most noisy queries. For more information, see "[SARIF results exceed one or more limits](https://docs.github.com/code-security/code-scanning/troubleshooting-sarif/results-exceed-limit)."
1147
+
1148
+
1149
+ | **SARIF data** | **Maximum values** | **Additional limits** |
1150
+ |----------------------------------|:------------------:|----------------------------------------------------------------------------------|
1151
+ | Runs per file | 20 | |
1152
+ | Results per run | 25,000 | Only the top 5,000 results will be included, prioritized by severity. |
1153
+ | Rules per run | 25,000 | |
1154
+ | Tool extensions per run | 100 | |
1155
+ | Thread Flow Locations per result | 10,000 | Only the top 1,000 Thread Flow Locations will be included, using prioritization. |
1156
+ | Location per result | 1,000 | Only 100 locations will be included. |
1157
+ | Tags per rule | 20 | Only 10 tags will be included. |
1158
+
1159
+
1160
+ The `202 Accepted` response includes an `id` value.
1161
+ You can use this ID to check the status of the upload by using it in the `/sarifs/{sarif_id}` endpoint.
1162
+ For more information, see "[Get information about a SARIF upload](/rest/code-scanning/code-scanning#get-information-about-a-sarif-upload)."
1163
+
1164
+ OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
1165
+
1166
+ This endpoint is limited to 1,000 requests per hour for each user or app installation calling it.
1167
+ """
1168
+ client = self.client
1169
+ if aspects is None:
1170
+ aspects = client.aspects
1171
+
1172
+ header_params = client.headers
1173
+ if headers is not None:
1174
+ header_params = headers
1175
+
1176
+ leaf_template = "/repos/{owner}/{repo}/code-scanning/sarifs"
1177
+ path_params = {
1178
+ 'owner': owner,
1179
+ 'repo': repo,
1180
+ }
1181
+ call_leaf = leaf_template.format(**path_params)
1182
+
1183
+ query_params = None
1184
+
1185
+
1186
+ if exp_status is None:
1187
+ exp_status = [202]
1188
+
1189
+ resp = client.perform_call(
1190
+ leaf=call_leaf,
1191
+ method="POST",
1192
+ params=query_params if query_params else None,
1193
+ body=body,
1194
+ exp_status=exp_status,
1195
+ headers=header_params if header_params else None,
1196
+ context_msg=None,
1197
+ aspects=aspects,
1198
+ )
1199
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
1200
+ rtnval = None
1201
+ else:
1202
+ rtnval = resp.json()
1203
+ return rtnval