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.
- ccai/restclient/github/public/__init__.py +0 -0
- ccai/restclient/github/public/generation/githubrestclientgenerator.py +56 -0
- ccai/restclient/github/public/generation/specs/api-hints.json +172 -0
- ccai/restclient/github/public/generation/specs/api-public.json +306020 -0
- ccai/restclient/github/public/generation/specs/pagination-hints.json +31 -0
- ccai/restclient/github/public/githubpublicrestclient.py +262 -0
- ccai/restclient/github/public/githubrestclientbase.py +120 -0
- ccai/restclient/github/public/groups/__init__.py +0 -0
- ccai/restclient/github/public/groups/actions.py +8042 -0
- ccai/restclient/github/public/groups/activity.py +1488 -0
- ccai/restclient/github/public/groups/apiinsights.py +478 -0
- ccai/restclient/github/public/groups/apps.py +1662 -0
- ccai/restclient/github/public/groups/billing.py +401 -0
- ccai/restclient/github/public/groups/campaigns.py +262 -0
- ccai/restclient/github/public/groups/checks.py +632 -0
- ccai/restclient/github/public/groups/classroom.py +276 -0
- ccai/restclient/github/public/groups/codescanning.py +1203 -0
- ccai/restclient/github/public/groups/codesecurity.py +997 -0
- ccai/restclient/github/public/groups/codesofconduct.py +92 -0
- ccai/restclient/github/public/groups/codespaces.py +2271 -0
- ccai/restclient/github/public/groups/copilot.py +517 -0
- ccai/restclient/github/public/groups/credentials.py +62 -0
- ccai/restclient/github/public/groups/dependabot.py +1155 -0
- ccai/restclient/github/public/groups/dependencygraph.py +152 -0
- ccai/restclient/github/public/groups/emojis.py +51 -0
- ccai/restclient/github/public/groups/gists.py +909 -0
- ccai/restclient/github/public/groups/git.py +734 -0
- ccai/restclient/github/public/groups/gitignore.py +96 -0
- ccai/restclient/github/public/groups/hostedcompute.py +290 -0
- ccai/restclient/github/public/groups/interactions.py +389 -0
- ccai/restclient/github/public/groups/issues.py +2460 -0
- ccai/restclient/github/public/groups/licenses.py +153 -0
- ccai/restclient/github/public/groups/markdown.py +88 -0
- ccai/restclient/github/public/groups/meta.py +213 -0
- ccai/restclient/github/public/groups/migrations.py +1079 -0
- ccai/restclient/github/public/groups/oidc.py +102 -0
- ccai/restclient/github/public/groups/orgs.py +3958 -0
- ccai/restclient/github/public/groups/packages.py +1316 -0
- ccai/restclient/github/public/groups/privateregistries.py +294 -0
- ccai/restclient/github/public/groups/projectsclassic.py +1154 -0
- ccai/restclient/github/public/groups/pulls.py +1469 -0
- ccai/restclient/github/public/groups/ratelimit.py +68 -0
- ccai/restclient/github/public/groups/reactions.py +1247 -0
- ccai/restclient/github/public/groups/repos.py +9741 -0
- ccai/restclient/github/public/groups/search.py +417 -0
- ccai/restclient/github/public/groups/secretscanning.py +568 -0
- ccai/restclient/github/public/groups/securityadvisories.py +541 -0
- ccai/restclient/github/public/groups/teams.py +2985 -0
- ccai/restclient/github/public/groups/users.py +2054 -0
- ccai/restclient/github/public/py.typed +0 -0
- ccai/restclient/github/public/schemas/__init__.py +0 -0
- ccai/restclient/github/public/schemas/actions.py +418 -0
- ccai/restclient/github/public/schemas/activity.py +95 -0
- ccai/restclient/github/public/schemas/actor.py +20 -0
- ccai/restclient/github/public/schemas/addedtoprojectissueevent.py +24 -0
- ccai/restclient/github/public/schemas/apps.py +151 -0
- ccai/restclient/github/public/schemas/assignedissueevent.py +25 -0
- ccai/restclient/github/public/schemas/authenticationtoken.py +20 -0
- ccai/restclient/github/public/schemas/automerge.py +16 -0
- ccai/restclient/github/public/schemas/basicerror.py +16 -0
- ccai/restclient/github/public/schemas/billing.py +27 -0
- ccai/restclient/github/public/schemas/billingusagereport.py +12 -0
- ccai/restclient/github/public/schemas/billingusagereportuser.py +12 -0
- ccai/restclient/github/public/schemas/campaigns.py +27 -0
- ccai/restclient/github/public/schemas/checkrunwithsimplechecksuite.py +31 -0
- ccai/restclient/github/public/schemas/checks.py +80 -0
- ccai/restclient/github/public/schemas/classroom.py +109 -0
- ccai/restclient/github/public/schemas/codeofconductsimple.py +18 -0
- ccai/restclient/github/public/schemas/codescanning.py +197 -0
- ccai/restclient/github/public/schemas/codescanningalertlocation.py +17 -0
- ccai/restclient/github/public/schemas/codescanningalertrule.py +20 -0
- ccai/restclient/github/public/schemas/codescanningalertrulesummary.py +20 -0
- ccai/restclient/github/public/schemas/codescanninganalysistool.py +14 -0
- ccai/restclient/github/public/schemas/codescanningautofixcommitsresponse.py +11 -0
- ccai/restclient/github/public/schemas/codescanningdefaultsetupupdateresponse.py +15 -0
- ccai/restclient/github/public/schemas/codescanningsarifsreceipt.py +11 -0
- ccai/restclient/github/public/schemas/codescanningvariantanalysisrepository.py +20 -0
- ccai/restclient/github/public/schemas/codescanningvariantanalysisskippedrepogroup.py +13 -0
- ccai/restclient/github/public/schemas/codesecurity.py +73 -0
- ccai/restclient/github/public/schemas/codesofconduct.py +19 -0
- ccai/restclient/github/public/schemas/codespaces.py +130 -0
- ccai/restclient/github/public/schemas/codespacewithfullrepository.py +45 -0
- ccai/restclient/github/public/schemas/commit.py +25 -0
- ccai/restclient/github/public/schemas/contenttree.py +27 -0
- ccai/restclient/github/public/schemas/convertednotetoissueissueevent.py +24 -0
- ccai/restclient/github/public/schemas/copilot.py +50 -0
- ccai/restclient/github/public/schemas/copilotdotcomchat.py +16 -0
- ccai/restclient/github/public/schemas/copilotdotcompullrequests.py +16 -0
- ccai/restclient/github/public/schemas/copilotidechat.py +16 -0
- ccai/restclient/github/public/schemas/copilotidecodecompletions.py +17 -0
- ccai/restclient/github/public/schemas/copilotorganizationseatbreakdown.py +18 -0
- ccai/restclient/github/public/schemas/cvssseverities.py +13 -0
- ccai/restclient/github/public/schemas/demilestonedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/dependabot.py +87 -0
- ccai/restclient/github/public/schemas/dependabotalertpackage.py +14 -0
- ccai/restclient/github/public/schemas/dependabotalertsecurityadvisory.py +29 -0
- ccai/restclient/github/public/schemas/dependabotalertsecurityvulnerability.py +18 -0
- ccai/restclient/github/public/schemas/dependency.py +16 -0
- ccai/restclient/github/public/schemas/dependencygraph.py +29 -0
- ccai/restclient/github/public/schemas/deploymentsimple.py +28 -0
- ccai/restclient/github/public/schemas/discussion.py +37 -0
- ccai/restclient/github/public/schemas/enterprise.py +24 -0
- ccai/restclient/github/public/schemas/enterpriseteam.py +27 -0
- ccai/restclient/github/public/schemas/enterprisewebhooks.py +26 -0
- ccai/restclient/github/public/schemas/gisthistory.py +19 -0
- ccai/restclient/github/public/schemas/gists.py +88 -0
- ccai/restclient/github/public/schemas/git.py +71 -0
- ccai/restclient/github/public/schemas/gitignore.py +14 -0
- ccai/restclient/github/public/schemas/hookdelivery.py +29 -0
- ccai/restclient/github/public/schemas/hookdeliveryitem.py +26 -0
- ccai/restclient/github/public/schemas/hookresponse.py +14 -0
- ccai/restclient/github/public/schemas/hostedcompute.py +30 -0
- ccai/restclient/github/public/schemas/installation.py +35 -0
- ccai/restclient/github/public/schemas/installationtoken.py +22 -0
- ccai/restclient/github/public/schemas/interactions.py +23 -0
- ccai/restclient/github/public/schemas/issuedependenciessummary.py +13 -0
- ccai/restclient/github/public/schemas/issueeventdismissedreview.py +15 -0
- ccai/restclient/github/public/schemas/issueeventlabel.py +16 -0
- ccai/restclient/github/public/schemas/issueeventmilestone.py +13 -0
- ccai/restclient/github/public/schemas/issueeventprojectcard.py +18 -0
- ccai/restclient/github/public/schemas/issueeventrename.py +14 -0
- ccai/restclient/github/public/schemas/issuefieldvalue.py +19 -0
- ccai/restclient/github/public/schemas/issues.py +135 -0
- ccai/restclient/github/public/schemas/labeledissueevent.py +24 -0
- ccai/restclient/github/public/schemas/licenses.py +58 -0
- ccai/restclient/github/public/schemas/link.py +13 -0
- ccai/restclient/github/public/schemas/linkwithtype.py +14 -0
- ccai/restclient/github/public/schemas/lockedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/manifest.py +15 -0
- ccai/restclient/github/public/schemas/marketplaceaccount.py +18 -0
- ccai/restclient/github/public/schemas/mergegroup.py +17 -0
- ccai/restclient/github/public/schemas/meta.py +67 -0
- ccai/restclient/github/public/schemas/migrations.py +84 -0
- ccai/restclient/github/public/schemas/milestonedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/minimalrepository.py +102 -0
- ccai/restclient/github/public/schemas/movedcolumninprojectissueevent.py +24 -0
- ccai/restclient/github/public/schemas/nullableactionshostedrunnerpoolimage.py +16 -0
- ccai/restclient/github/public/schemas/nullablecodeofconductsimple.py +18 -0
- ccai/restclient/github/public/schemas/nullablecodespacemachine.py +21 -0
- ccai/restclient/github/public/schemas/nullablecollaborator.py +37 -0
- ccai/restclient/github/public/schemas/nullablecommunityhealthfile.py +11 -0
- ccai/restclient/github/public/schemas/nullablegituser.py +15 -0
- ccai/restclient/github/public/schemas/nullableintegration.py +28 -0
- ccai/restclient/github/public/schemas/nullableissue.py +52 -0
- ccai/restclient/github/public/schemas/nullablelicensesimple.py +20 -0
- ccai/restclient/github/public/schemas/nullablemilestone.py +30 -0
- ccai/restclient/github/public/schemas/nullableminimalrepository.py +102 -0
- ccai/restclient/github/public/schemas/nullableorganizationsimple.py +26 -0
- ccai/restclient/github/public/schemas/nullableprojectsv2statusupdate.py +24 -0
- ccai/restclient/github/public/schemas/nullablerepository.py +110 -0
- ccai/restclient/github/public/schemas/nullablerepositorywebhooks.py +115 -0
- ccai/restclient/github/public/schemas/nullablescopedinstallation.py +18 -0
- ccai/restclient/github/public/schemas/nullablesimplecommit.py +20 -0
- ccai/restclient/github/public/schemas/nullablesimplerepository.py +60 -0
- ccai/restclient/github/public/schemas/nullablesimpleuser.py +36 -0
- ccai/restclient/github/public/schemas/nullableteamsimple.py +27 -0
- ccai/restclient/github/public/schemas/oidc.py +15 -0
- ccai/restclient/github/public/schemas/organizationinvitation.py +26 -0
- ccai/restclient/github/public/schemas/organizationsimplewebhooks.py +27 -0
- ccai/restclient/github/public/schemas/orgprivateregistryconfigurationwithselectedrepositories.py +21 -0
- ccai/restclient/github/public/schemas/orgs.py +332 -0
- ccai/restclient/github/public/schemas/packages.py +42 -0
- ccai/restclient/github/public/schemas/pagebuildstatus.py +14 -0
- ccai/restclient/github/public/schemas/pageshttpscertificate.py +15 -0
- ccai/restclient/github/public/schemas/pagessourcehash.py +11 -0
- ccai/restclient/github/public/schemas/personalaccesstokenrequest.py +28 -0
- ccai/restclient/github/public/schemas/privateregistries.py +20 -0
- ccai/restclient/github/public/schemas/projectsclassic.py +70 -0
- ccai/restclient/github/public/schemas/projectsv2.py +31 -0
- ccai/restclient/github/public/schemas/projectsv2item.py +23 -0
- ccai/restclient/github/public/schemas/projectsv2iterationsetting.py +20 -0
- ccai/restclient/github/public/schemas/projectsv2singleselectoption.py +18 -0
- ccai/restclient/github/public/schemas/projectsv2statusupdate.py +24 -0
- ccai/restclient/github/public/schemas/protectedbranchrequiredstatuscheck.py +20 -0
- ccai/restclient/github/public/schemas/publicip.py +15 -0
- ccai/restclient/github/public/schemas/pullrequestminimal.py +16 -0
- ccai/restclient/github/public/schemas/pullrequestsimple.py +50 -0
- ccai/restclient/github/public/schemas/pulls.py +185 -0
- ccai/restclient/github/public/schemas/ratelimit.py +23 -0
- ccai/restclient/github/public/schemas/reactions.py +17 -0
- ccai/restclient/github/public/schemas/referencedworkflow.py +15 -0
- ccai/restclient/github/public/schemas/removedfromprojectissueevent.py +24 -0
- ccai/restclient/github/public/schemas/renamedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/repos.py +952 -0
- ccai/restclient/github/public/schemas/repository.py +110 -0
- ccai/restclient/github/public/schemas/repositoryadvisorycredit.py +15 -0
- ccai/restclient/github/public/schemas/repositoryadvisoryvulnerability.py +18 -0
- ccai/restclient/github/public/schemas/repositoryrulebranchnamepattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecodescanning.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecommitauthoremailpattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecommitmessagepattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecommitteremailpattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecreation.py +13 -0
- ccai/restclient/github/public/schemas/repositoryruledeletion.py +13 -0
- ccai/restclient/github/public/schemas/repositoryrulefileextensionrestriction.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulefilepathrestriction.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulemaxfilepathlength.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulemaxfilesize.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulemergequeue.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulenonfastforward.py +13 -0
- ccai/restclient/github/public/schemas/repositoryruleparamscodescanningtool.py +15 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsrequiredreviewerconfiguration.py +17 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsrestrictedcommits.py +14 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsreviewer.py +14 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsstatuscheckconfiguration.py +14 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsworkflowfilereference.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulepullrequest.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulerequireddeployments.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulerequiredlinearhistory.py +13 -0
- ccai/restclient/github/public/schemas/repositoryrulerequiredsignatures.py +13 -0
- ccai/restclient/github/public/schemas/repositoryrulerequiredstatuschecks.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulerulesetinfo.py +15 -0
- ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositoryidtarget.py +15 -0
- ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositorynametarget.py +15 -0
- ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositorypropertyspec.py +17 -0
- ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositorypropertytarget.py +15 -0
- ccai/restclient/github/public/schemas/repositoryruletagnamepattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryruleupdate.py +16 -0
- ccai/restclient/github/public/schemas/repositoryruleviolationerror.py +18 -0
- ccai/restclient/github/public/schemas/repositoryruleworkflows.py +16 -0
- ccai/restclient/github/public/schemas/repositorywebhooks.py +115 -0
- ccai/restclient/github/public/schemas/reviewdismissedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/reviewrequestedissueevent.py +26 -0
- ccai/restclient/github/public/schemas/reviewrequestremovedissueevent.py +26 -0
- ccai/restclient/github/public/schemas/rulesetversion.py +17 -0
- ccai/restclient/github/public/schemas/runnerlabel.py +15 -0
- ccai/restclient/github/public/schemas/scimerror.py +20 -0
- ccai/restclient/github/public/schemas/search.py +263 -0
- ccai/restclient/github/public/schemas/secretscanning.py +96 -0
- ccai/restclient/github/public/schemas/secretscanningalertwebhook.py +33 -0
- ccai/restclient/github/public/schemas/secretscanninglocationcommit.py +21 -0
- ccai/restclient/github/public/schemas/secretscanninglocationdiscussionbody.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationdiscussioncomment.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationdiscussiontitle.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationissuebody.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationissuecomment.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationissuetitle.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequestbody.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequestcomment.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequestreview.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequestreviewcomment.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequesttitle.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationwikicommit.py +21 -0
- ccai/restclient/github/public/schemas/secretscanningpatternoverride.py +23 -0
- ccai/restclient/github/public/schemas/secretscanningscan.py +18 -0
- ccai/restclient/github/public/schemas/securityadvisories.py +106 -0
- ccai/restclient/github/public/schemas/securityadvisoryepss.py +14 -0
- ccai/restclient/github/public/schemas/securityandanalysis.py +18 -0
- ccai/restclient/github/public/schemas/shortblob.py +14 -0
- ccai/restclient/github/public/schemas/simplechecksuite.py +28 -0
- ccai/restclient/github/public/schemas/simpleclassroomorganization.py +20 -0
- ccai/restclient/github/public/schemas/simpleclassroomrepository.py +18 -0
- ccai/restclient/github/public/schemas/simpleclassroomuser.py +16 -0
- ccai/restclient/github/public/schemas/simplecommit.py +20 -0
- ccai/restclient/github/public/schemas/simplecommitstatus.py +22 -0
- ccai/restclient/github/public/schemas/simpleinstallation.py +16 -0
- ccai/restclient/github/public/schemas/simplerepository.py +60 -0
- ccai/restclient/github/public/schemas/statechangeissueevent.py +24 -0
- ccai/restclient/github/public/schemas/subissuessummary.py +12 -0
- ccai/restclient/github/public/schemas/teamorganization.py +63 -0
- ccai/restclient/github/public/schemas/teams.py +202 -0
- ccai/restclient/github/public/schemas/timelineassignedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/timelinecommentevent.py +30 -0
- ccai/restclient/github/public/schemas/timelinecommitcommentedevent.py +18 -0
- ccai/restclient/github/public/schemas/timelinecommittedevent.py +25 -0
- ccai/restclient/github/public/schemas/timelinecrossreferencedevent.py +19 -0
- ccai/restclient/github/public/schemas/timelinelinecommentedevent.py +17 -0
- ccai/restclient/github/public/schemas/timelinereviewedevent.py +29 -0
- ccai/restclient/github/public/schemas/timelineunassignedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/traffic.py +12 -0
- ccai/restclient/github/public/schemas/unassignedissueevent.py +25 -0
- ccai/restclient/github/public/schemas/unlabeledissueevent.py +24 -0
- ccai/restclient/github/public/schemas/users.py +183 -0
- ccai/restclient/github/public/schemas/validationerror.py +17 -0
- ccai/restclient/github/public/schemas/validationerrorsimple.py +17 -0
- ccai/restclient/github/public/schemas/verification.py +16 -0
- ccai/restclient/github/public/schemas/vulnerability.py +18 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionconfigurationdisabled.py +15 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionconfigurationenabled.py +15 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionrulecreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionruledeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionruleedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookcheckruncompleted.py +15 -0
- ccai/restclient/github/public/schemas/webhookcheckruncompletedformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookcheckruncreated.py +15 -0
- ccai/restclient/github/public/schemas/webhookcheckruncreatedformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookcheckrunrequestedaction.py +18 -0
- ccai/restclient/github/public/schemas/webhookcheckrunrequestedactionformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookcheckrunrerequested.py +15 -0
- ccai/restclient/github/public/schemas/webhookcheckrunrerequestedformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookchecksuitecompleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookchecksuiterequested.py +18 -0
- ccai/restclient/github/public/schemas/webhookchecksuitererequested.py +18 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertappearedinbranch.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertclosedbyuser.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertcreated.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertfixed.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertreopened.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertreopenedbyuser.py +20 -0
- ccai/restclient/github/public/schemas/webhookcommitcommentcreated.py +18 -0
- ccai/restclient/github/public/schemas/webhookcreate.py +21 -0
- ccai/restclient/github/public/schemas/webhookcustompropertycreated.py +15 -0
- ccai/restclient/github/public/schemas/webhookcustompropertydeleted.py +17 -0
- ccai/restclient/github/public/schemas/webhookcustompropertypromotedtoenterprise.py +15 -0
- ccai/restclient/github/public/schemas/webhookcustompropertyupdated.py +15 -0
- ccai/restclient/github/public/schemas/webhookcustompropertyvaluesupdated.py +19 -0
- ccai/restclient/github/public/schemas/webhookdelete.py +17 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertautodismissed.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertautoreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertdismissed.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertfixed.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertreintroduced.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookdeploykeycreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookdeploykeydeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookdeploymentcreated.py +20 -0
- ccai/restclient/github/public/schemas/webhookdeploymentprotectionrulerequested.py +21 -0
- ccai/restclient/github/public/schemas/webhookdeploymentreviewapproved.py +24 -0
- ccai/restclient/github/public/schemas/webhookdeploymentreviewrejected.py +24 -0
- ccai/restclient/github/public/schemas/webhookdeploymentreviewrequested.py +23 -0
- ccai/restclient/github/public/schemas/webhookdeploymentstatuscreated.py +22 -0
- ccai/restclient/github/public/schemas/webhookdiscussionanswered.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncategorychanged.py +19 -0
- ccai/restclient/github/public/schemas/webhookdiscussionclosed.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncommentcreated.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncommentdeleted.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncommentedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussiondeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussionedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookdiscussionlabeled.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussionlocked.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussionpinned.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussionreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussiontransferred.py +19 -0
- ccai/restclient/github/public/schemas/webhookdiscussionunanswered.py +15 -0
- ccai/restclient/github/public/schemas/webhookdiscussionunlabeled.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussionunlocked.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussionunpinned.py +16 -0
- ccai/restclient/github/public/schemas/webhookfork.py +18 -0
- ccai/restclient/github/public/schemas/webhookgithubappauthorizationrevoked.py +11 -0
- ccai/restclient/github/public/schemas/webhookgollum.py +17 -0
- ccai/restclient/github/public/schemas/webhookinstallationcreated.py +19 -0
- ccai/restclient/github/public/schemas/webhookinstallationdeleted.py +19 -0
- ccai/restclient/github/public/schemas/webhookinstallationnewpermissionsaccepted.py +19 -0
- ccai/restclient/github/public/schemas/webhookinstallationrepositoriesadded.py +21 -0
- ccai/restclient/github/public/schemas/webhookinstallationrepositoriesremoved.py +21 -0
- ccai/restclient/github/public/schemas/webhookinstallationsuspend.py +19 -0
- ccai/restclient/github/public/schemas/webhookinstallationtargetrenamed.py +20 -0
- ccai/restclient/github/public/schemas/webhookinstallationunsuspend.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuecommentcreated.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuecommentdeleted.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuecommentedited.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuedependenciesblockedbyadded.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuedependenciesblockedbyremoved.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuedependenciesblockingadded.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuedependenciesblockingremoved.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuesassigned.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuesclosed.py +16 -0
- ccai/restclient/github/public/schemas/webhookissuesdeleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuesdemilestoned.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuesedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookissueslabeled.py +19 -0
- ccai/restclient/github/public/schemas/webhookissueslocked.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuesmilestoned.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuesopened.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuespinned.py +16 -0
- ccai/restclient/github/public/schemas/webhookissuesreopened.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuestransferred.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuestyped.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuesunassigned.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuesunlabeled.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuesunlocked.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuesunpinned.py +16 -0
- ccai/restclient/github/public/schemas/webhookissuesuntyped.py +17 -0
- ccai/restclient/github/public/schemas/webhooklabelcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhooklabeldeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhooklabeledited.py +19 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasecancelled.py +18 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasechanged.py +20 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasependingchange.py +20 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasependingchangecancelled.py +20 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasepurchased.py +18 -0
- ccai/restclient/github/public/schemas/webhookmemberadded.py +19 -0
- ccai/restclient/github/public/schemas/webhookmemberedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookmemberremoved.py +16 -0
- ccai/restclient/github/public/schemas/webhookmembershipadded.py +20 -0
- ccai/restclient/github/public/schemas/webhookmembershipremoved.py +20 -0
- ccai/restclient/github/public/schemas/webhookmergegroupchecksrequested.py +15 -0
- ccai/restclient/github/public/schemas/webhookmergegroupdestroyed.py +16 -0
- ccai/restclient/github/public/schemas/webhookmetadeleted.py +19 -0
- ccai/restclient/github/public/schemas/webhookmilestoneclosed.py +16 -0
- ccai/restclient/github/public/schemas/webhookmilestonecreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookmilestonedeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookmilestoneedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookmilestoneopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookorganizationdeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookorganizationmemberadded.py +16 -0
- ccai/restclient/github/public/schemas/webhookorganizationmemberinvited.py +19 -0
- ccai/restclient/github/public/schemas/webhookorganizationmemberremoved.py +16 -0
- ccai/restclient/github/public/schemas/webhookorganizationrenamed.py +19 -0
- ccai/restclient/github/public/schemas/webhookorgblockblocked.py +16 -0
- ccai/restclient/github/public/schemas/webhookorgblockunblocked.py +16 -0
- ccai/restclient/github/public/schemas/webhookpackagepublished.py +18 -0
- ccai/restclient/github/public/schemas/webhookpackageupdated.py +18 -0
- ccai/restclient/github/public/schemas/webhookpagebuild.py +18 -0
- ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestapproved.py +15 -0
- ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestcancelled.py +15 -0
- ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestcreated.py +15 -0
- ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestdenied.py +15 -0
- ccai/restclient/github/public/schemas/webhookping.py +17 -0
- ccai/restclient/github/public/schemas/webhookpingformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookprojectcardconverted.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectcardcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcarddeleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookprojectcardedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectcardmoved.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectclosed.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcolumncreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcolumndeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcolumnedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectcolumnmoved.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectdeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemarchived.py +15 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemconverted.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemcreated.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemdeleted.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemedited.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemreordered.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemrestored.py +15 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectclosed.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectcreated.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectdeleted.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectedited.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectreopened.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2statusupdatecreated.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2statusupdatedeleted.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2statusupdateedited.py +17 -0
- ccai/restclient/github/public/schemas/webhookpublic.py +14 -0
- ccai/restclient/github/public/schemas/webhookpullrequestassigned.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestautomergedisabled.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestautomergeenabled.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestclosed.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestconvertedtodraft.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestdemilestoned.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestdequeued.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestenqueued.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestlabeled.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestlocked.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestmilestoned.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestopened.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreadyforreview.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreopened.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewcommentcreated.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewcommentdeleted.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewcommentedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewdismissed.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewsubmitted.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewthreadresolved.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewthreadunresolved.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestsynchronize.py +21 -0
- ccai/restclient/github/public/schemas/webhookpullrequestunassigned.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestunlabeled.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestunlocked.py +19 -0
- ccai/restclient/github/public/schemas/webhookpush.py +27 -0
- ccai/restclient/github/public/schemas/webhookregistrypackagepublished.py +18 -0
- ccai/restclient/github/public/schemas/webhookregistrypackageupdated.py +18 -0
- ccai/restclient/github/public/schemas/webhookreleasecreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookreleasedeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookreleaseedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookreleaseprereleased.py +18 -0
- ccai/restclient/github/public/schemas/webhookreleasepublished.py +16 -0
- ccai/restclient/github/public/schemas/webhookreleasereleased.py +16 -0
- ccai/restclient/github/public/schemas/webhookreleaseunpublished.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryadvisorypublished.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryadvisoryreported.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryarchived.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositorycreated.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositorydeleted.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositorydispatchsample.py +19 -0
- ccai/restclient/github/public/schemas/webhookrepositoryedited.py +18 -0
- ccai/restclient/github/public/schemas/webhookrepositoryimport.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositoryprivatized.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositorypublicized.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositoryrenamed.py +18 -0
- ccai/restclient/github/public/schemas/webhookrepositoryrulesetcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryrulesetdeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryrulesetedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookrepositorytransferred.py +18 -0
- ccai/restclient/github/public/schemas/webhookrepositoryunarchived.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertcreate.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertdismiss.py +18 -0
- ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertreopen.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertresolve.py +18 -0
- ccai/restclient/github/public/schemas/webhookrubygemsmetadata.py +21 -0
- ccai/restclient/github/public/schemas/webhooksalert.py +31 -0
- ccai/restclient/github/public/schemas/webhooksanswer.py +24 -0
- ccai/restclient/github/public/schemas/webhooksapprover.py +28 -0
- ccai/restclient/github/public/schemas/webhookschanges.py +15 -0
- ccai/restclient/github/public/schemas/webhookschanges8.py +12 -0
- ccai/restclient/github/public/schemas/webhookscomment.py +24 -0
- ccai/restclient/github/public/schemas/webhooksdeploykey.py +24 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertlocationcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertlocationcreatedformencoded.py +10 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertpubliclyleaked.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertresolved.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertvalidated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningscancompleted.py +24 -0
- ccai/restclient/github/public/schemas/webhooksecurityadvisorypublished.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecurityadvisoryupdated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecurityadvisorywithdrawn.py +18 -0
- ccai/restclient/github/public/schemas/webhooksecurityandanalysis.py +17 -0
- ccai/restclient/github/public/schemas/webhooksissue.py +48 -0
- ccai/restclient/github/public/schemas/webhooksissue2.py +48 -0
- ccai/restclient/github/public/schemas/webhooksissuecomment.py +26 -0
- ccai/restclient/github/public/schemas/webhookslabel.py +18 -0
- ccai/restclient/github/public/schemas/webhooksmarketplacepurchase.py +18 -0
- ccai/restclient/github/public/schemas/webhooksmembership.py +21 -0
- ccai/restclient/github/public/schemas/webhooksmilestone.py +30 -0
- ccai/restclient/github/public/schemas/webhooksmilestone3.py +30 -0
- ccai/restclient/github/public/schemas/webhooksponsorshipcancelled.py +16 -0
- ccai/restclient/github/public/schemas/webhooksponsorshipcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksponsorshipedited.py +19 -0
- ccai/restclient/github/public/schemas/webhooksponsorshippendingcancellation.py +17 -0
- ccai/restclient/github/public/schemas/webhooksponsorshippendingtierchange.py +18 -0
- ccai/restclient/github/public/schemas/webhooksponsorshiptierchanged.py +17 -0
- ccai/restclient/github/public/schemas/webhookspreviousmarketplacepurchase.py +18 -0
- ccai/restclient/github/public/schemas/webhooksproject.py +24 -0
- ccai/restclient/github/public/schemas/webhooksprojectcard.py +24 -0
- ccai/restclient/github/public/schemas/webhooksprojectchanges.py +12 -0
- ccai/restclient/github/public/schemas/webhooksprojectcolumn.py +20 -0
- ccai/restclient/github/public/schemas/webhookspullrequest5.py +59 -0
- ccai/restclient/github/public/schemas/webhooksrelease.py +36 -0
- ccai/restclient/github/public/schemas/webhooksrelease1.py +36 -0
- ccai/restclient/github/public/schemas/webhooksreview.py +26 -0
- ccai/restclient/github/public/schemas/webhooksreviewcomment.py +41 -0
- ccai/restclient/github/public/schemas/webhooksrule.py +42 -0
- ccai/restclient/github/public/schemas/webhookssecurityadvisory.py +27 -0
- ccai/restclient/github/public/schemas/webhookssponsorship.py +18 -0
- ccai/restclient/github/public/schemas/webhookstarcreated.py +18 -0
- ccai/restclient/github/public/schemas/webhookstardeleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookstatus.py +28 -0
- ccai/restclient/github/public/schemas/webhooksteam.py +28 -0
- ccai/restclient/github/public/schemas/webhooksteam1.py +28 -0
- ccai/restclient/github/public/schemas/webhooksubissuesparentissueadded.py +19 -0
- ccai/restclient/github/public/schemas/webhooksubissuesparentissueremoved.py +19 -0
- ccai/restclient/github/public/schemas/webhooksubissuessubissueadded.py +19 -0
- ccai/restclient/github/public/schemas/webhooksubissuessubissueremoved.py +19 -0
- ccai/restclient/github/public/schemas/webhooksuser.py +33 -0
- ccai/restclient/github/public/schemas/webhooksusermannequin.py +33 -0
- ccai/restclient/github/public/schemas/webhooksworkflow.py +19 -0
- ccai/restclient/github/public/schemas/webhooksworkflowjobrun.py +19 -0
- ccai/restclient/github/public/schemas/webhookteamadd.py +15 -0
- ccai/restclient/github/public/schemas/webhookteamaddedtorepository.py +18 -0
- ccai/restclient/github/public/schemas/webhookteamcreated.py +18 -0
- ccai/restclient/github/public/schemas/webhookteamdeleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookteamedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookteamremovedfromrepository.py +18 -0
- ccai/restclient/github/public/schemas/webhookwatchstarted.py +15 -0
- ccai/restclient/github/public/schemas/webhookworkflowdispatch.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowjobcompleted.py +17 -0
- ccai/restclient/github/public/schemas/webhookworkflowjobinprogress.py +17 -0
- ccai/restclient/github/public/schemas/webhookworkflowjobqueued.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowjobwaiting.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowruncompleted.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowruninprogress.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowrunrequested.py +19 -0
- codecraftai_restclient_github_public-1.2.0.dist-info/METADATA +87 -0
- codecraftai_restclient_github_public-1.2.0.dist-info/RECORD +579 -0
- codecraftai_restclient_github_public-1.2.0.dist-info/WHEEL +4 -0
- codecraftai_restclient_github_public-1.2.0.dist-info/licenses/LICENSE.md +204 -0
|
@@ -0,0 +1,2271 @@
|
|
|
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.restapigroup import RestApiGroup
|
|
7
|
+
from ccai.restclient.github.public.schemas.codespaces import Codespace
|
|
8
|
+
from ccai.restclient.github.public.schemas.codespaces import CodespaceExportDetails
|
|
9
|
+
from ccai.restclient.github.public.schemas.codespaces import CodespacesOrgSecret
|
|
10
|
+
from ccai.restclient.github.public.schemas.codespaces import CodespacesPermissionsCheckForDevcontainer
|
|
11
|
+
from ccai.restclient.github.public.schemas.codespaces import CodespacesPublicKey
|
|
12
|
+
from ccai.restclient.github.public.schemas.codespaces import CodespacesSecret
|
|
13
|
+
from ccai.restclient.github.public.schemas.codespaces import CodespacesUserPublicKey
|
|
14
|
+
from ccai.restclient.github.public.schemas.codespaces import RepoCodespacesSecret
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CodespacesApiGroup(RestApiGroup):
|
|
18
|
+
"""
|
|
19
|
+
Endpoints to manage Codespaces using the REST API.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
def add_repository_for_secret_for_authenticated_user(self, secret_name: str, repository_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
23
|
+
"""
|
|
24
|
+
Add a selected repository to a user secret
|
|
25
|
+
|
|
26
|
+
Adds a repository to the selected repositories for a user's development environment secret.
|
|
27
|
+
|
|
28
|
+
The authenticated user must have Codespaces access to use this endpoint.
|
|
29
|
+
|
|
30
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint.
|
|
31
|
+
"""
|
|
32
|
+
client = self.client
|
|
33
|
+
if aspects is None:
|
|
34
|
+
aspects = client.aspects
|
|
35
|
+
|
|
36
|
+
header_params = client.headers
|
|
37
|
+
if headers is not None:
|
|
38
|
+
header_params = headers
|
|
39
|
+
|
|
40
|
+
leaf_template = "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}"
|
|
41
|
+
path_params = {
|
|
42
|
+
'secret_name': secret_name,
|
|
43
|
+
'repository_id': repository_id,
|
|
44
|
+
}
|
|
45
|
+
call_leaf = leaf_template.format(**path_params)
|
|
46
|
+
|
|
47
|
+
query_params = None
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
if exp_status is None:
|
|
51
|
+
exp_status = [204]
|
|
52
|
+
|
|
53
|
+
resp = client.perform_call(
|
|
54
|
+
leaf=call_leaf,
|
|
55
|
+
method="PUT",
|
|
56
|
+
params=query_params if query_params else None,
|
|
57
|
+
body=None,
|
|
58
|
+
exp_status=exp_status,
|
|
59
|
+
headers=header_params if header_params else None,
|
|
60
|
+
context_msg=None,
|
|
61
|
+
aspects=aspects,
|
|
62
|
+
)
|
|
63
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
64
|
+
rtnval = None
|
|
65
|
+
else:
|
|
66
|
+
rtnval = resp.json()
|
|
67
|
+
return rtnval
|
|
68
|
+
|
|
69
|
+
def add_selected_repo_to_org_secret(self, org: str, secret_name: str, repository_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
70
|
+
"""
|
|
71
|
+
Add selected repository to an organization secret
|
|
72
|
+
|
|
73
|
+
Adds a repository to an organization development environment secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#create-or-update-an-organization-secret).
|
|
74
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
75
|
+
"""
|
|
76
|
+
client = self.client
|
|
77
|
+
if aspects is None:
|
|
78
|
+
aspects = client.aspects
|
|
79
|
+
|
|
80
|
+
header_params = client.headers
|
|
81
|
+
if headers is not None:
|
|
82
|
+
header_params = headers
|
|
83
|
+
|
|
84
|
+
leaf_template = "/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"
|
|
85
|
+
path_params = {
|
|
86
|
+
'org': org,
|
|
87
|
+
'secret_name': secret_name,
|
|
88
|
+
'repository_id': repository_id,
|
|
89
|
+
}
|
|
90
|
+
call_leaf = leaf_template.format(**path_params)
|
|
91
|
+
|
|
92
|
+
query_params = None
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
if exp_status is None:
|
|
96
|
+
exp_status = [204]
|
|
97
|
+
|
|
98
|
+
resp = client.perform_call(
|
|
99
|
+
leaf=call_leaf,
|
|
100
|
+
method="PUT",
|
|
101
|
+
params=query_params if query_params else None,
|
|
102
|
+
body=None,
|
|
103
|
+
exp_status=exp_status,
|
|
104
|
+
headers=header_params if header_params else None,
|
|
105
|
+
context_msg=None,
|
|
106
|
+
aspects=aspects,
|
|
107
|
+
)
|
|
108
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
109
|
+
rtnval = None
|
|
110
|
+
else:
|
|
111
|
+
rtnval = resp.json()
|
|
112
|
+
return rtnval
|
|
113
|
+
|
|
114
|
+
def check_permissions_for_devcontainer(self, owner: str, repo: str, ref: str, devcontainer_path: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodespacesPermissionsCheckForDevcontainer:
|
|
115
|
+
"""
|
|
116
|
+
Check if permissions defined by a devcontainer have been accepted by the authenticated user
|
|
117
|
+
|
|
118
|
+
Checks whether the permissions defined by a given devcontainer configuration have been accepted by the authenticated user.
|
|
119
|
+
|
|
120
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
121
|
+
"""
|
|
122
|
+
client = self.client
|
|
123
|
+
if aspects is None:
|
|
124
|
+
aspects = client.aspects
|
|
125
|
+
|
|
126
|
+
header_params = client.headers
|
|
127
|
+
if headers is not None:
|
|
128
|
+
header_params = headers
|
|
129
|
+
|
|
130
|
+
leaf_template = "/repos/{owner}/{repo}/codespaces/permissions_check"
|
|
131
|
+
path_params = {
|
|
132
|
+
'owner': owner,
|
|
133
|
+
'repo': repo,
|
|
134
|
+
}
|
|
135
|
+
call_leaf = leaf_template.format(**path_params)
|
|
136
|
+
|
|
137
|
+
query_params = {}
|
|
138
|
+
if ref is not None:
|
|
139
|
+
query_params['ref'] = ref
|
|
140
|
+
if devcontainer_path is not None:
|
|
141
|
+
query_params['devcontainer_path'] = devcontainer_path
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
if exp_status is None:
|
|
145
|
+
exp_status = [200]
|
|
146
|
+
|
|
147
|
+
resp = client.perform_call(
|
|
148
|
+
leaf=call_leaf,
|
|
149
|
+
method="GET",
|
|
150
|
+
params=query_params if query_params else None,
|
|
151
|
+
body=None,
|
|
152
|
+
exp_status=exp_status,
|
|
153
|
+
headers=header_params if header_params else None,
|
|
154
|
+
context_msg=None,
|
|
155
|
+
aspects=aspects,
|
|
156
|
+
)
|
|
157
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
158
|
+
rtnobj = None
|
|
159
|
+
else:
|
|
160
|
+
raw_data = resp.json()
|
|
161
|
+
rtnobj = CodespacesPermissionsCheckForDevcontainer.from_dict(raw_data)
|
|
162
|
+
return rtnobj
|
|
163
|
+
|
|
164
|
+
def codespace_machines_for_authenticated_user(self, codespace_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
165
|
+
"""
|
|
166
|
+
List machine types for a codespace
|
|
167
|
+
|
|
168
|
+
List the machine types a codespace can transition to use.
|
|
169
|
+
|
|
170
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
171
|
+
"""
|
|
172
|
+
client = self.client
|
|
173
|
+
if aspects is None:
|
|
174
|
+
aspects = client.aspects
|
|
175
|
+
|
|
176
|
+
header_params = client.headers
|
|
177
|
+
if headers is not None:
|
|
178
|
+
header_params = headers
|
|
179
|
+
|
|
180
|
+
leaf_template = "/user/codespaces/{codespace_name}/machines"
|
|
181
|
+
path_params = {
|
|
182
|
+
'codespace_name': codespace_name,
|
|
183
|
+
}
|
|
184
|
+
call_leaf = leaf_template.format(**path_params)
|
|
185
|
+
|
|
186
|
+
query_params = None
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
if exp_status is None:
|
|
190
|
+
exp_status = [200]
|
|
191
|
+
|
|
192
|
+
resp = client.perform_call(
|
|
193
|
+
leaf=call_leaf,
|
|
194
|
+
method="GET",
|
|
195
|
+
params=query_params if query_params else None,
|
|
196
|
+
body=None,
|
|
197
|
+
exp_status=exp_status,
|
|
198
|
+
headers=header_params if header_params else None,
|
|
199
|
+
context_msg=None,
|
|
200
|
+
aspects=aspects,
|
|
201
|
+
)
|
|
202
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
203
|
+
rtnval = None
|
|
204
|
+
else:
|
|
205
|
+
raw_data = resp.json()
|
|
206
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
207
|
+
return rtnval
|
|
208
|
+
|
|
209
|
+
def create_for_authenticated_user(self, body: Union[Dict[str, Any], Dict[str, Any]], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
210
|
+
"""
|
|
211
|
+
Create a codespace for the authenticated user
|
|
212
|
+
|
|
213
|
+
Creates a new codespace, owned by the authenticated user.
|
|
214
|
+
|
|
215
|
+
This endpoint requires either a `repository_id` OR a `pull_request` but not both.
|
|
216
|
+
|
|
217
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
218
|
+
"""
|
|
219
|
+
client = self.client
|
|
220
|
+
if aspects is None:
|
|
221
|
+
aspects = client.aspects
|
|
222
|
+
|
|
223
|
+
header_params = client.headers
|
|
224
|
+
if headers is not None:
|
|
225
|
+
header_params = headers
|
|
226
|
+
|
|
227
|
+
call_leaf = "/user/codespaces"
|
|
228
|
+
|
|
229
|
+
query_params = None
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
if exp_status is None:
|
|
233
|
+
exp_status = [201, 202]
|
|
234
|
+
|
|
235
|
+
resp = client.perform_call(
|
|
236
|
+
leaf=call_leaf,
|
|
237
|
+
method="POST",
|
|
238
|
+
params=query_params if query_params else None,
|
|
239
|
+
body=body,
|
|
240
|
+
exp_status=exp_status,
|
|
241
|
+
headers=header_params if header_params else None,
|
|
242
|
+
context_msg=None,
|
|
243
|
+
aspects=aspects,
|
|
244
|
+
)
|
|
245
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
246
|
+
rtnval = None
|
|
247
|
+
else:
|
|
248
|
+
rtnval = resp.json()
|
|
249
|
+
return rtnval
|
|
250
|
+
|
|
251
|
+
def create_or_update_org_secret(self, org: str, secret_name: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
252
|
+
"""
|
|
253
|
+
Create or update an organization secret
|
|
254
|
+
|
|
255
|
+
Creates or updates an organization development environment secret with an encrypted value. Encrypt your secret using
|
|
256
|
+
[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."
|
|
257
|
+
|
|
258
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
259
|
+
"""
|
|
260
|
+
client = self.client
|
|
261
|
+
if aspects is None:
|
|
262
|
+
aspects = client.aspects
|
|
263
|
+
|
|
264
|
+
header_params = client.headers
|
|
265
|
+
if headers is not None:
|
|
266
|
+
header_params = headers
|
|
267
|
+
|
|
268
|
+
leaf_template = "/orgs/{org}/codespaces/secrets/{secret_name}"
|
|
269
|
+
path_params = {
|
|
270
|
+
'org': org,
|
|
271
|
+
'secret_name': secret_name,
|
|
272
|
+
}
|
|
273
|
+
call_leaf = leaf_template.format(**path_params)
|
|
274
|
+
|
|
275
|
+
query_params = None
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
if exp_status is None:
|
|
279
|
+
exp_status = [201, 204]
|
|
280
|
+
|
|
281
|
+
resp = client.perform_call(
|
|
282
|
+
leaf=call_leaf,
|
|
283
|
+
method="PUT",
|
|
284
|
+
params=query_params if query_params else None,
|
|
285
|
+
body=body,
|
|
286
|
+
exp_status=exp_status,
|
|
287
|
+
headers=header_params if header_params else None,
|
|
288
|
+
context_msg=None,
|
|
289
|
+
aspects=aspects,
|
|
290
|
+
)
|
|
291
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
292
|
+
rtnval = None
|
|
293
|
+
else:
|
|
294
|
+
rtnval = resp.json()
|
|
295
|
+
return rtnval
|
|
296
|
+
|
|
297
|
+
def create_or_update_repo_secret(self, owner: str, repo: str, secret_name: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
298
|
+
"""
|
|
299
|
+
Create or update a repository secret
|
|
300
|
+
|
|
301
|
+
Creates or updates a repository development environment secret with an encrypted value. Encrypt your secret using
|
|
302
|
+
[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."
|
|
303
|
+
|
|
304
|
+
OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The associated user must be a repository admin.
|
|
305
|
+
"""
|
|
306
|
+
client = self.client
|
|
307
|
+
if aspects is None:
|
|
308
|
+
aspects = client.aspects
|
|
309
|
+
|
|
310
|
+
header_params = client.headers
|
|
311
|
+
if headers is not None:
|
|
312
|
+
header_params = headers
|
|
313
|
+
|
|
314
|
+
leaf_template = "/repos/{owner}/{repo}/codespaces/secrets/{secret_name}"
|
|
315
|
+
path_params = {
|
|
316
|
+
'owner': owner,
|
|
317
|
+
'repo': repo,
|
|
318
|
+
'secret_name': secret_name,
|
|
319
|
+
}
|
|
320
|
+
call_leaf = leaf_template.format(**path_params)
|
|
321
|
+
|
|
322
|
+
query_params = None
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
if exp_status is None:
|
|
326
|
+
exp_status = [201, 204]
|
|
327
|
+
|
|
328
|
+
resp = client.perform_call(
|
|
329
|
+
leaf=call_leaf,
|
|
330
|
+
method="PUT",
|
|
331
|
+
params=query_params if query_params else None,
|
|
332
|
+
body=body,
|
|
333
|
+
exp_status=exp_status,
|
|
334
|
+
headers=header_params if header_params else None,
|
|
335
|
+
context_msg=None,
|
|
336
|
+
aspects=aspects,
|
|
337
|
+
)
|
|
338
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
339
|
+
rtnval = None
|
|
340
|
+
else:
|
|
341
|
+
rtnval = resp.json()
|
|
342
|
+
return rtnval
|
|
343
|
+
|
|
344
|
+
def create_or_update_secret_for_authenticated_user(self, secret_name: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
345
|
+
"""
|
|
346
|
+
Create or update a secret for the authenticated user
|
|
347
|
+
|
|
348
|
+
Creates or updates a development environment secret for a user's codespace with an encrypted value. Encrypt your secret using
|
|
349
|
+
[LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."
|
|
350
|
+
|
|
351
|
+
The authenticated user must have Codespaces access to use this endpoint.
|
|
352
|
+
|
|
353
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint.
|
|
354
|
+
"""
|
|
355
|
+
client = self.client
|
|
356
|
+
if aspects is None:
|
|
357
|
+
aspects = client.aspects
|
|
358
|
+
|
|
359
|
+
header_params = client.headers
|
|
360
|
+
if headers is not None:
|
|
361
|
+
header_params = headers
|
|
362
|
+
|
|
363
|
+
leaf_template = "/user/codespaces/secrets/{secret_name}"
|
|
364
|
+
path_params = {
|
|
365
|
+
'secret_name': secret_name,
|
|
366
|
+
}
|
|
367
|
+
call_leaf = leaf_template.format(**path_params)
|
|
368
|
+
|
|
369
|
+
query_params = None
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
if exp_status is None:
|
|
373
|
+
exp_status = [201, 204]
|
|
374
|
+
|
|
375
|
+
resp = client.perform_call(
|
|
376
|
+
leaf=call_leaf,
|
|
377
|
+
method="PUT",
|
|
378
|
+
params=query_params if query_params else None,
|
|
379
|
+
body=body,
|
|
380
|
+
exp_status=exp_status,
|
|
381
|
+
headers=header_params if header_params else None,
|
|
382
|
+
context_msg=None,
|
|
383
|
+
aspects=aspects,
|
|
384
|
+
)
|
|
385
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
386
|
+
rtnval = None
|
|
387
|
+
else:
|
|
388
|
+
rtnval = resp.json()
|
|
389
|
+
return rtnval
|
|
390
|
+
|
|
391
|
+
def create_with_pr_for_authenticated_user(self, owner: str, repo: str, pull_number: int, body: Optional[Dict[str, Any]], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
392
|
+
"""
|
|
393
|
+
Create a codespace from a pull request
|
|
394
|
+
|
|
395
|
+
Creates a codespace owned by the authenticated user for the specified pull request.
|
|
396
|
+
|
|
397
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
398
|
+
"""
|
|
399
|
+
client = self.client
|
|
400
|
+
if aspects is None:
|
|
401
|
+
aspects = client.aspects
|
|
402
|
+
|
|
403
|
+
header_params = client.headers
|
|
404
|
+
if headers is not None:
|
|
405
|
+
header_params = headers
|
|
406
|
+
|
|
407
|
+
leaf_template = "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces"
|
|
408
|
+
path_params = {
|
|
409
|
+
'owner': owner,
|
|
410
|
+
'repo': repo,
|
|
411
|
+
'pull_number': pull_number,
|
|
412
|
+
}
|
|
413
|
+
call_leaf = leaf_template.format(**path_params)
|
|
414
|
+
|
|
415
|
+
query_params = None
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
if exp_status is None:
|
|
419
|
+
exp_status = [201, 202]
|
|
420
|
+
|
|
421
|
+
resp = client.perform_call(
|
|
422
|
+
leaf=call_leaf,
|
|
423
|
+
method="POST",
|
|
424
|
+
params=query_params if query_params else None,
|
|
425
|
+
body=body,
|
|
426
|
+
exp_status=exp_status,
|
|
427
|
+
headers=header_params if header_params else None,
|
|
428
|
+
context_msg=None,
|
|
429
|
+
aspects=aspects,
|
|
430
|
+
)
|
|
431
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
432
|
+
rtnval = None
|
|
433
|
+
else:
|
|
434
|
+
rtnval = resp.json()
|
|
435
|
+
return rtnval
|
|
436
|
+
|
|
437
|
+
def create_with_repo_for_authenticated_user(self, owner: str, repo: str, body: Optional[Dict[str, Any]], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
438
|
+
"""
|
|
439
|
+
Create a codespace in a repository
|
|
440
|
+
|
|
441
|
+
Creates a codespace owned by the authenticated user in the specified repository.
|
|
442
|
+
|
|
443
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
444
|
+
"""
|
|
445
|
+
client = self.client
|
|
446
|
+
if aspects is None:
|
|
447
|
+
aspects = client.aspects
|
|
448
|
+
|
|
449
|
+
header_params = client.headers
|
|
450
|
+
if headers is not None:
|
|
451
|
+
header_params = headers
|
|
452
|
+
|
|
453
|
+
leaf_template = "/repos/{owner}/{repo}/codespaces"
|
|
454
|
+
path_params = {
|
|
455
|
+
'owner': owner,
|
|
456
|
+
'repo': repo,
|
|
457
|
+
}
|
|
458
|
+
call_leaf = leaf_template.format(**path_params)
|
|
459
|
+
|
|
460
|
+
query_params = None
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
if exp_status is None:
|
|
464
|
+
exp_status = [201, 202]
|
|
465
|
+
|
|
466
|
+
resp = client.perform_call(
|
|
467
|
+
leaf=call_leaf,
|
|
468
|
+
method="POST",
|
|
469
|
+
params=query_params if query_params else None,
|
|
470
|
+
body=body,
|
|
471
|
+
exp_status=exp_status,
|
|
472
|
+
headers=header_params if header_params else None,
|
|
473
|
+
context_msg=None,
|
|
474
|
+
aspects=aspects,
|
|
475
|
+
)
|
|
476
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
477
|
+
rtnval = None
|
|
478
|
+
else:
|
|
479
|
+
rtnval = resp.json()
|
|
480
|
+
return rtnval
|
|
481
|
+
|
|
482
|
+
def delete_codespaces_access_users(self, org: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
483
|
+
"""
|
|
484
|
+
Remove users from Codespaces access for an organization
|
|
485
|
+
|
|
486
|
+
Codespaces for the specified users will no longer be billed to the organization.
|
|
487
|
+
|
|
488
|
+
To use this endpoint, the access settings for the organization must be set to `selected_members`.
|
|
489
|
+
For information on how to change this setting, see "[Manage access control for organization codespaces](https://docs.github.com/rest/codespaces/organizations#manage-access-control-for-organization-codespaces)."
|
|
490
|
+
|
|
491
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
492
|
+
"""
|
|
493
|
+
client = self.client
|
|
494
|
+
if aspects is None:
|
|
495
|
+
aspects = client.aspects
|
|
496
|
+
|
|
497
|
+
header_params = client.headers
|
|
498
|
+
if headers is not None:
|
|
499
|
+
header_params = headers
|
|
500
|
+
|
|
501
|
+
leaf_template = "/orgs/{org}/codespaces/access/selected_users"
|
|
502
|
+
path_params = {
|
|
503
|
+
'org': org,
|
|
504
|
+
}
|
|
505
|
+
call_leaf = leaf_template.format(**path_params)
|
|
506
|
+
|
|
507
|
+
query_params = None
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
if exp_status is None:
|
|
511
|
+
exp_status = [204]
|
|
512
|
+
|
|
513
|
+
resp = client.perform_call(
|
|
514
|
+
leaf=call_leaf,
|
|
515
|
+
method="DELETE",
|
|
516
|
+
params=query_params if query_params else None,
|
|
517
|
+
body=body,
|
|
518
|
+
exp_status=exp_status,
|
|
519
|
+
headers=header_params if header_params else None,
|
|
520
|
+
context_msg=None,
|
|
521
|
+
aspects=aspects,
|
|
522
|
+
)
|
|
523
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
524
|
+
rtnval = None
|
|
525
|
+
else:
|
|
526
|
+
rtnval = resp.json()
|
|
527
|
+
return rtnval
|
|
528
|
+
|
|
529
|
+
def delete_for_authenticated_user(self, codespace_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
530
|
+
"""
|
|
531
|
+
Delete a codespace for the authenticated user
|
|
532
|
+
|
|
533
|
+
Deletes a user's codespace.
|
|
534
|
+
|
|
535
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
536
|
+
"""
|
|
537
|
+
client = self.client
|
|
538
|
+
if aspects is None:
|
|
539
|
+
aspects = client.aspects
|
|
540
|
+
|
|
541
|
+
header_params = client.headers
|
|
542
|
+
if headers is not None:
|
|
543
|
+
header_params = headers
|
|
544
|
+
|
|
545
|
+
leaf_template = "/user/codespaces/{codespace_name}"
|
|
546
|
+
path_params = {
|
|
547
|
+
'codespace_name': codespace_name,
|
|
548
|
+
}
|
|
549
|
+
call_leaf = leaf_template.format(**path_params)
|
|
550
|
+
|
|
551
|
+
query_params = None
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
if exp_status is None:
|
|
555
|
+
exp_status = [202]
|
|
556
|
+
|
|
557
|
+
resp = client.perform_call(
|
|
558
|
+
leaf=call_leaf,
|
|
559
|
+
method="DELETE",
|
|
560
|
+
params=query_params if query_params else None,
|
|
561
|
+
body=None,
|
|
562
|
+
exp_status=exp_status,
|
|
563
|
+
headers=header_params if header_params else None,
|
|
564
|
+
context_msg=None,
|
|
565
|
+
aspects=aspects,
|
|
566
|
+
)
|
|
567
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
568
|
+
rtnval = None
|
|
569
|
+
else:
|
|
570
|
+
rtnval = resp.json()
|
|
571
|
+
return rtnval
|
|
572
|
+
|
|
573
|
+
def delete_from_organization(self, org: str, username: str, codespace_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
574
|
+
"""
|
|
575
|
+
Delete a codespace from the organization
|
|
576
|
+
|
|
577
|
+
Deletes a user's codespace.
|
|
578
|
+
|
|
579
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
580
|
+
"""
|
|
581
|
+
client = self.client
|
|
582
|
+
if aspects is None:
|
|
583
|
+
aspects = client.aspects
|
|
584
|
+
|
|
585
|
+
header_params = client.headers
|
|
586
|
+
if headers is not None:
|
|
587
|
+
header_params = headers
|
|
588
|
+
|
|
589
|
+
leaf_template = "/orgs/{org}/members/{username}/codespaces/{codespace_name}"
|
|
590
|
+
path_params = {
|
|
591
|
+
'org': org,
|
|
592
|
+
'username': username,
|
|
593
|
+
'codespace_name': codespace_name,
|
|
594
|
+
}
|
|
595
|
+
call_leaf = leaf_template.format(**path_params)
|
|
596
|
+
|
|
597
|
+
query_params = None
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
if exp_status is None:
|
|
601
|
+
exp_status = [202]
|
|
602
|
+
|
|
603
|
+
resp = client.perform_call(
|
|
604
|
+
leaf=call_leaf,
|
|
605
|
+
method="DELETE",
|
|
606
|
+
params=query_params if query_params else None,
|
|
607
|
+
body=None,
|
|
608
|
+
exp_status=exp_status,
|
|
609
|
+
headers=header_params if header_params else None,
|
|
610
|
+
context_msg=None,
|
|
611
|
+
aspects=aspects,
|
|
612
|
+
)
|
|
613
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
614
|
+
rtnval = None
|
|
615
|
+
else:
|
|
616
|
+
rtnval = resp.json()
|
|
617
|
+
return rtnval
|
|
618
|
+
|
|
619
|
+
def delete_org_secret(self, org: str, secret_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
620
|
+
"""
|
|
621
|
+
Delete an organization secret
|
|
622
|
+
|
|
623
|
+
Deletes an organization development environment secret using the secret name.
|
|
624
|
+
|
|
625
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
626
|
+
"""
|
|
627
|
+
client = self.client
|
|
628
|
+
if aspects is None:
|
|
629
|
+
aspects = client.aspects
|
|
630
|
+
|
|
631
|
+
header_params = client.headers
|
|
632
|
+
if headers is not None:
|
|
633
|
+
header_params = headers
|
|
634
|
+
|
|
635
|
+
leaf_template = "/orgs/{org}/codespaces/secrets/{secret_name}"
|
|
636
|
+
path_params = {
|
|
637
|
+
'org': org,
|
|
638
|
+
'secret_name': secret_name,
|
|
639
|
+
}
|
|
640
|
+
call_leaf = leaf_template.format(**path_params)
|
|
641
|
+
|
|
642
|
+
query_params = None
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
if exp_status is None:
|
|
646
|
+
exp_status = [204]
|
|
647
|
+
|
|
648
|
+
resp = client.perform_call(
|
|
649
|
+
leaf=call_leaf,
|
|
650
|
+
method="DELETE",
|
|
651
|
+
params=query_params if query_params else None,
|
|
652
|
+
body=None,
|
|
653
|
+
exp_status=exp_status,
|
|
654
|
+
headers=header_params if header_params else None,
|
|
655
|
+
context_msg=None,
|
|
656
|
+
aspects=aspects,
|
|
657
|
+
)
|
|
658
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
659
|
+
rtnval = None
|
|
660
|
+
else:
|
|
661
|
+
rtnval = resp.json()
|
|
662
|
+
return rtnval
|
|
663
|
+
|
|
664
|
+
def delete_repo_secret(self, owner: str, repo: str, secret_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
665
|
+
"""
|
|
666
|
+
Delete a repository secret
|
|
667
|
+
|
|
668
|
+
Deletes a development environment secret in a repository using the secret name.
|
|
669
|
+
|
|
670
|
+
OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The associated user must be a repository admin.
|
|
671
|
+
"""
|
|
672
|
+
client = self.client
|
|
673
|
+
if aspects is None:
|
|
674
|
+
aspects = client.aspects
|
|
675
|
+
|
|
676
|
+
header_params = client.headers
|
|
677
|
+
if headers is not None:
|
|
678
|
+
header_params = headers
|
|
679
|
+
|
|
680
|
+
leaf_template = "/repos/{owner}/{repo}/codespaces/secrets/{secret_name}"
|
|
681
|
+
path_params = {
|
|
682
|
+
'owner': owner,
|
|
683
|
+
'repo': repo,
|
|
684
|
+
'secret_name': secret_name,
|
|
685
|
+
}
|
|
686
|
+
call_leaf = leaf_template.format(**path_params)
|
|
687
|
+
|
|
688
|
+
query_params = None
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
if exp_status is None:
|
|
692
|
+
exp_status = [204]
|
|
693
|
+
|
|
694
|
+
resp = client.perform_call(
|
|
695
|
+
leaf=call_leaf,
|
|
696
|
+
method="DELETE",
|
|
697
|
+
params=query_params if query_params else None,
|
|
698
|
+
body=None,
|
|
699
|
+
exp_status=exp_status,
|
|
700
|
+
headers=header_params if header_params else None,
|
|
701
|
+
context_msg=None,
|
|
702
|
+
aspects=aspects,
|
|
703
|
+
)
|
|
704
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
705
|
+
rtnval = None
|
|
706
|
+
else:
|
|
707
|
+
rtnval = resp.json()
|
|
708
|
+
return rtnval
|
|
709
|
+
|
|
710
|
+
def delete_secret_for_authenticated_user(self, secret_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
711
|
+
"""
|
|
712
|
+
Delete a secret for the authenticated user
|
|
713
|
+
|
|
714
|
+
Deletes a development environment secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret.
|
|
715
|
+
|
|
716
|
+
The authenticated user must have Codespaces access to use this endpoint.
|
|
717
|
+
|
|
718
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint.
|
|
719
|
+
"""
|
|
720
|
+
client = self.client
|
|
721
|
+
if aspects is None:
|
|
722
|
+
aspects = client.aspects
|
|
723
|
+
|
|
724
|
+
header_params = client.headers
|
|
725
|
+
if headers is not None:
|
|
726
|
+
header_params = headers
|
|
727
|
+
|
|
728
|
+
leaf_template = "/user/codespaces/secrets/{secret_name}"
|
|
729
|
+
path_params = {
|
|
730
|
+
'secret_name': secret_name,
|
|
731
|
+
}
|
|
732
|
+
call_leaf = leaf_template.format(**path_params)
|
|
733
|
+
|
|
734
|
+
query_params = None
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
if exp_status is None:
|
|
738
|
+
exp_status = [204]
|
|
739
|
+
|
|
740
|
+
resp = client.perform_call(
|
|
741
|
+
leaf=call_leaf,
|
|
742
|
+
method="DELETE",
|
|
743
|
+
params=query_params if query_params else None,
|
|
744
|
+
body=None,
|
|
745
|
+
exp_status=exp_status,
|
|
746
|
+
headers=header_params if header_params else None,
|
|
747
|
+
context_msg=None,
|
|
748
|
+
aspects=aspects,
|
|
749
|
+
)
|
|
750
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
751
|
+
rtnval = None
|
|
752
|
+
else:
|
|
753
|
+
rtnval = resp.json()
|
|
754
|
+
return rtnval
|
|
755
|
+
|
|
756
|
+
def export_for_authenticated_user(self, codespace_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
757
|
+
"""
|
|
758
|
+
Export a codespace for the authenticated user
|
|
759
|
+
|
|
760
|
+
Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored.
|
|
761
|
+
|
|
762
|
+
If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead.
|
|
763
|
+
|
|
764
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
765
|
+
"""
|
|
766
|
+
client = self.client
|
|
767
|
+
if aspects is None:
|
|
768
|
+
aspects = client.aspects
|
|
769
|
+
|
|
770
|
+
header_params = client.headers
|
|
771
|
+
if headers is not None:
|
|
772
|
+
header_params = headers
|
|
773
|
+
|
|
774
|
+
leaf_template = "/user/codespaces/{codespace_name}/exports"
|
|
775
|
+
path_params = {
|
|
776
|
+
'codespace_name': codespace_name,
|
|
777
|
+
}
|
|
778
|
+
call_leaf = leaf_template.format(**path_params)
|
|
779
|
+
|
|
780
|
+
query_params = None
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
if exp_status is None:
|
|
784
|
+
exp_status = [202]
|
|
785
|
+
|
|
786
|
+
resp = client.perform_call(
|
|
787
|
+
leaf=call_leaf,
|
|
788
|
+
method="POST",
|
|
789
|
+
params=query_params if query_params else None,
|
|
790
|
+
body=None,
|
|
791
|
+
exp_status=exp_status,
|
|
792
|
+
headers=header_params if header_params else None,
|
|
793
|
+
context_msg=None,
|
|
794
|
+
aspects=aspects,
|
|
795
|
+
)
|
|
796
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
797
|
+
rtnval = None
|
|
798
|
+
else:
|
|
799
|
+
rtnval = resp.json()
|
|
800
|
+
return rtnval
|
|
801
|
+
|
|
802
|
+
def get_codespaces_for_user_in_org(self, org: str, username: str, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
803
|
+
"""
|
|
804
|
+
List codespaces for a user in organization
|
|
805
|
+
|
|
806
|
+
Lists the codespaces that a member of an organization has for repositories in that organization.
|
|
807
|
+
|
|
808
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
809
|
+
"""
|
|
810
|
+
client = self.client
|
|
811
|
+
if aspects is None:
|
|
812
|
+
aspects = client.aspects
|
|
813
|
+
|
|
814
|
+
header_params = client.headers
|
|
815
|
+
if headers is not None:
|
|
816
|
+
header_params = headers
|
|
817
|
+
|
|
818
|
+
leaf_template = "/orgs/{org}/members/{username}/codespaces"
|
|
819
|
+
path_params = {
|
|
820
|
+
'org': org,
|
|
821
|
+
'username': username,
|
|
822
|
+
}
|
|
823
|
+
call_leaf = leaf_template.format(**path_params)
|
|
824
|
+
|
|
825
|
+
query_params = {}
|
|
826
|
+
if per_page is not None:
|
|
827
|
+
query_params['per_page'] = per_page
|
|
828
|
+
if page is not None:
|
|
829
|
+
query_params['page'] = page
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
if exp_status is None:
|
|
833
|
+
exp_status = [200]
|
|
834
|
+
|
|
835
|
+
resp = client.perform_call(
|
|
836
|
+
leaf=call_leaf,
|
|
837
|
+
method="GET",
|
|
838
|
+
params=query_params if query_params else None,
|
|
839
|
+
body=None,
|
|
840
|
+
exp_status=exp_status,
|
|
841
|
+
headers=header_params if header_params else None,
|
|
842
|
+
context_msg=None,
|
|
843
|
+
aspects=aspects,
|
|
844
|
+
)
|
|
845
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
846
|
+
rtnval = None
|
|
847
|
+
else:
|
|
848
|
+
raw_data = resp.json()
|
|
849
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
850
|
+
return rtnval
|
|
851
|
+
|
|
852
|
+
def get_export_details_for_authenticated_user(self, codespace_name: str, export_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodespaceExportDetails:
|
|
853
|
+
"""
|
|
854
|
+
Get details about a codespace export
|
|
855
|
+
|
|
856
|
+
Gets information about an export of a codespace.
|
|
857
|
+
|
|
858
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
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 = "/user/codespaces/{codespace_name}/exports/{export_id}"
|
|
869
|
+
path_params = {
|
|
870
|
+
'codespace_name': codespace_name,
|
|
871
|
+
'export_id': export_id,
|
|
872
|
+
}
|
|
873
|
+
call_leaf = leaf_template.format(**path_params)
|
|
874
|
+
|
|
875
|
+
query_params = None
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
if exp_status is None:
|
|
879
|
+
exp_status = [200]
|
|
880
|
+
|
|
881
|
+
resp = client.perform_call(
|
|
882
|
+
leaf=call_leaf,
|
|
883
|
+
method="GET",
|
|
884
|
+
params=query_params if query_params else None,
|
|
885
|
+
body=None,
|
|
886
|
+
exp_status=exp_status,
|
|
887
|
+
headers=header_params if header_params else None,
|
|
888
|
+
context_msg=None,
|
|
889
|
+
aspects=aspects,
|
|
890
|
+
)
|
|
891
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
892
|
+
rtnobj = None
|
|
893
|
+
else:
|
|
894
|
+
raw_data = resp.json()
|
|
895
|
+
rtnobj = CodespaceExportDetails.from_dict(raw_data)
|
|
896
|
+
return rtnobj
|
|
897
|
+
|
|
898
|
+
def get_for_authenticated_user(self, codespace_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Codespace:
|
|
899
|
+
"""
|
|
900
|
+
Get a codespace for the authenticated user
|
|
901
|
+
|
|
902
|
+
Gets information about a user's codespace.
|
|
903
|
+
|
|
904
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
905
|
+
"""
|
|
906
|
+
client = self.client
|
|
907
|
+
if aspects is None:
|
|
908
|
+
aspects = client.aspects
|
|
909
|
+
|
|
910
|
+
header_params = client.headers
|
|
911
|
+
if headers is not None:
|
|
912
|
+
header_params = headers
|
|
913
|
+
|
|
914
|
+
leaf_template = "/user/codespaces/{codespace_name}"
|
|
915
|
+
path_params = {
|
|
916
|
+
'codespace_name': codespace_name,
|
|
917
|
+
}
|
|
918
|
+
call_leaf = leaf_template.format(**path_params)
|
|
919
|
+
|
|
920
|
+
query_params = None
|
|
921
|
+
|
|
922
|
+
|
|
923
|
+
if exp_status is None:
|
|
924
|
+
exp_status = [200]
|
|
925
|
+
|
|
926
|
+
resp = client.perform_call(
|
|
927
|
+
leaf=call_leaf,
|
|
928
|
+
method="GET",
|
|
929
|
+
params=query_params if query_params else None,
|
|
930
|
+
body=None,
|
|
931
|
+
exp_status=exp_status,
|
|
932
|
+
headers=header_params if header_params else None,
|
|
933
|
+
context_msg=None,
|
|
934
|
+
aspects=aspects,
|
|
935
|
+
)
|
|
936
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
937
|
+
rtnobj = None
|
|
938
|
+
else:
|
|
939
|
+
raw_data = resp.json()
|
|
940
|
+
rtnobj = Codespace.from_dict(raw_data)
|
|
941
|
+
return rtnobj
|
|
942
|
+
|
|
943
|
+
def get_org_public_key(self, org: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodespacesPublicKey:
|
|
944
|
+
"""
|
|
945
|
+
Get an organization public key
|
|
946
|
+
|
|
947
|
+
Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets.
|
|
948
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
949
|
+
"""
|
|
950
|
+
client = self.client
|
|
951
|
+
if aspects is None:
|
|
952
|
+
aspects = client.aspects
|
|
953
|
+
|
|
954
|
+
header_params = client.headers
|
|
955
|
+
if headers is not None:
|
|
956
|
+
header_params = headers
|
|
957
|
+
|
|
958
|
+
leaf_template = "/orgs/{org}/codespaces/secrets/public-key"
|
|
959
|
+
path_params = {
|
|
960
|
+
'org': org,
|
|
961
|
+
}
|
|
962
|
+
call_leaf = leaf_template.format(**path_params)
|
|
963
|
+
|
|
964
|
+
query_params = None
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
if exp_status is None:
|
|
968
|
+
exp_status = [200]
|
|
969
|
+
|
|
970
|
+
resp = client.perform_call(
|
|
971
|
+
leaf=call_leaf,
|
|
972
|
+
method="GET",
|
|
973
|
+
params=query_params if query_params else None,
|
|
974
|
+
body=None,
|
|
975
|
+
exp_status=exp_status,
|
|
976
|
+
headers=header_params if header_params else None,
|
|
977
|
+
context_msg=None,
|
|
978
|
+
aspects=aspects,
|
|
979
|
+
)
|
|
980
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
981
|
+
rtnobj = None
|
|
982
|
+
else:
|
|
983
|
+
raw_data = resp.json()
|
|
984
|
+
rtnobj = CodespacesPublicKey.from_dict(raw_data)
|
|
985
|
+
return rtnobj
|
|
986
|
+
|
|
987
|
+
def get_org_secret(self, org: str, secret_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodespacesOrgSecret:
|
|
988
|
+
"""
|
|
989
|
+
Get an organization secret
|
|
990
|
+
|
|
991
|
+
Gets an organization development environment secret without revealing its encrypted value.
|
|
992
|
+
|
|
993
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
994
|
+
"""
|
|
995
|
+
client = self.client
|
|
996
|
+
if aspects is None:
|
|
997
|
+
aspects = client.aspects
|
|
998
|
+
|
|
999
|
+
header_params = client.headers
|
|
1000
|
+
if headers is not None:
|
|
1001
|
+
header_params = headers
|
|
1002
|
+
|
|
1003
|
+
leaf_template = "/orgs/{org}/codespaces/secrets/{secret_name}"
|
|
1004
|
+
path_params = {
|
|
1005
|
+
'org': org,
|
|
1006
|
+
'secret_name': secret_name,
|
|
1007
|
+
}
|
|
1008
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1009
|
+
|
|
1010
|
+
query_params = None
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
if exp_status is None:
|
|
1014
|
+
exp_status = [200]
|
|
1015
|
+
|
|
1016
|
+
resp = client.perform_call(
|
|
1017
|
+
leaf=call_leaf,
|
|
1018
|
+
method="GET",
|
|
1019
|
+
params=query_params if query_params else None,
|
|
1020
|
+
body=None,
|
|
1021
|
+
exp_status=exp_status,
|
|
1022
|
+
headers=header_params if header_params else None,
|
|
1023
|
+
context_msg=None,
|
|
1024
|
+
aspects=aspects,
|
|
1025
|
+
)
|
|
1026
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1027
|
+
rtnobj = None
|
|
1028
|
+
else:
|
|
1029
|
+
raw_data = resp.json()
|
|
1030
|
+
rtnobj = CodespacesOrgSecret.from_dict(raw_data)
|
|
1031
|
+
return rtnobj
|
|
1032
|
+
|
|
1033
|
+
def get_public_key_for_authenticated_user(self, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodespacesUserPublicKey:
|
|
1034
|
+
"""
|
|
1035
|
+
Get public key for the authenticated user
|
|
1036
|
+
|
|
1037
|
+
Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets.
|
|
1038
|
+
|
|
1039
|
+
The authenticated user must have Codespaces access to use this endpoint.
|
|
1040
|
+
|
|
1041
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint.
|
|
1042
|
+
"""
|
|
1043
|
+
client = self.client
|
|
1044
|
+
if aspects is None:
|
|
1045
|
+
aspects = client.aspects
|
|
1046
|
+
|
|
1047
|
+
header_params = client.headers
|
|
1048
|
+
if headers is not None:
|
|
1049
|
+
header_params = headers
|
|
1050
|
+
|
|
1051
|
+
call_leaf = "/user/codespaces/secrets/public-key"
|
|
1052
|
+
|
|
1053
|
+
query_params = None
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
if exp_status is None:
|
|
1057
|
+
exp_status = [200]
|
|
1058
|
+
|
|
1059
|
+
resp = client.perform_call(
|
|
1060
|
+
leaf=call_leaf,
|
|
1061
|
+
method="GET",
|
|
1062
|
+
params=query_params if query_params else None,
|
|
1063
|
+
body=None,
|
|
1064
|
+
exp_status=exp_status,
|
|
1065
|
+
headers=header_params if header_params else None,
|
|
1066
|
+
context_msg=None,
|
|
1067
|
+
aspects=aspects,
|
|
1068
|
+
)
|
|
1069
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1070
|
+
rtnobj = None
|
|
1071
|
+
else:
|
|
1072
|
+
raw_data = resp.json()
|
|
1073
|
+
rtnobj = CodespacesUserPublicKey.from_dict(raw_data)
|
|
1074
|
+
return rtnobj
|
|
1075
|
+
|
|
1076
|
+
def get_repo_public_key(self, owner: str, repo: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodespacesPublicKey:
|
|
1077
|
+
"""
|
|
1078
|
+
Get a repository public key
|
|
1079
|
+
|
|
1080
|
+
Gets your public key, which you need to encrypt secrets. You need to
|
|
1081
|
+
encrypt a secret before you can create or update secrets.
|
|
1082
|
+
|
|
1083
|
+
If the repository is private, OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
|
|
1084
|
+
"""
|
|
1085
|
+
client = self.client
|
|
1086
|
+
if aspects is None:
|
|
1087
|
+
aspects = client.aspects
|
|
1088
|
+
|
|
1089
|
+
header_params = client.headers
|
|
1090
|
+
if headers is not None:
|
|
1091
|
+
header_params = headers
|
|
1092
|
+
|
|
1093
|
+
leaf_template = "/repos/{owner}/{repo}/codespaces/secrets/public-key"
|
|
1094
|
+
path_params = {
|
|
1095
|
+
'owner': owner,
|
|
1096
|
+
'repo': repo,
|
|
1097
|
+
}
|
|
1098
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1099
|
+
|
|
1100
|
+
query_params = None
|
|
1101
|
+
|
|
1102
|
+
|
|
1103
|
+
if exp_status is None:
|
|
1104
|
+
exp_status = [200]
|
|
1105
|
+
|
|
1106
|
+
resp = client.perform_call(
|
|
1107
|
+
leaf=call_leaf,
|
|
1108
|
+
method="GET",
|
|
1109
|
+
params=query_params if query_params else None,
|
|
1110
|
+
body=None,
|
|
1111
|
+
exp_status=exp_status,
|
|
1112
|
+
headers=header_params if header_params else None,
|
|
1113
|
+
context_msg=None,
|
|
1114
|
+
aspects=aspects,
|
|
1115
|
+
)
|
|
1116
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1117
|
+
rtnobj = None
|
|
1118
|
+
else:
|
|
1119
|
+
raw_data = resp.json()
|
|
1120
|
+
rtnobj = CodespacesPublicKey.from_dict(raw_data)
|
|
1121
|
+
return rtnobj
|
|
1122
|
+
|
|
1123
|
+
def get_repo_secret(self, owner: str, repo: str, secret_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> RepoCodespacesSecret:
|
|
1124
|
+
"""
|
|
1125
|
+
Get a repository secret
|
|
1126
|
+
|
|
1127
|
+
Gets a single repository development environment secret without revealing its encrypted value.
|
|
1128
|
+
|
|
1129
|
+
OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
|
|
1130
|
+
"""
|
|
1131
|
+
client = self.client
|
|
1132
|
+
if aspects is None:
|
|
1133
|
+
aspects = client.aspects
|
|
1134
|
+
|
|
1135
|
+
header_params = client.headers
|
|
1136
|
+
if headers is not None:
|
|
1137
|
+
header_params = headers
|
|
1138
|
+
|
|
1139
|
+
leaf_template = "/repos/{owner}/{repo}/codespaces/secrets/{secret_name}"
|
|
1140
|
+
path_params = {
|
|
1141
|
+
'owner': owner,
|
|
1142
|
+
'repo': repo,
|
|
1143
|
+
'secret_name': secret_name,
|
|
1144
|
+
}
|
|
1145
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1146
|
+
|
|
1147
|
+
query_params = None
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
if exp_status is None:
|
|
1151
|
+
exp_status = [200]
|
|
1152
|
+
|
|
1153
|
+
resp = client.perform_call(
|
|
1154
|
+
leaf=call_leaf,
|
|
1155
|
+
method="GET",
|
|
1156
|
+
params=query_params if query_params else None,
|
|
1157
|
+
body=None,
|
|
1158
|
+
exp_status=exp_status,
|
|
1159
|
+
headers=header_params if header_params else None,
|
|
1160
|
+
context_msg=None,
|
|
1161
|
+
aspects=aspects,
|
|
1162
|
+
)
|
|
1163
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1164
|
+
rtnobj = None
|
|
1165
|
+
else:
|
|
1166
|
+
raw_data = resp.json()
|
|
1167
|
+
rtnobj = RepoCodespacesSecret.from_dict(raw_data)
|
|
1168
|
+
return rtnobj
|
|
1169
|
+
|
|
1170
|
+
def get_secret_for_authenticated_user(self, secret_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> CodespacesSecret:
|
|
1171
|
+
"""
|
|
1172
|
+
Get a secret for the authenticated user
|
|
1173
|
+
|
|
1174
|
+
Gets a development environment secret available to a user's codespaces without revealing its encrypted value.
|
|
1175
|
+
|
|
1176
|
+
The authenticated user must have Codespaces access to use this endpoint.
|
|
1177
|
+
|
|
1178
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint.
|
|
1179
|
+
"""
|
|
1180
|
+
client = self.client
|
|
1181
|
+
if aspects is None:
|
|
1182
|
+
aspects = client.aspects
|
|
1183
|
+
|
|
1184
|
+
header_params = client.headers
|
|
1185
|
+
if headers is not None:
|
|
1186
|
+
header_params = headers
|
|
1187
|
+
|
|
1188
|
+
leaf_template = "/user/codespaces/secrets/{secret_name}"
|
|
1189
|
+
path_params = {
|
|
1190
|
+
'secret_name': secret_name,
|
|
1191
|
+
}
|
|
1192
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1193
|
+
|
|
1194
|
+
query_params = None
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
if exp_status is None:
|
|
1198
|
+
exp_status = [200]
|
|
1199
|
+
|
|
1200
|
+
resp = client.perform_call(
|
|
1201
|
+
leaf=call_leaf,
|
|
1202
|
+
method="GET",
|
|
1203
|
+
params=query_params if query_params else None,
|
|
1204
|
+
body=None,
|
|
1205
|
+
exp_status=exp_status,
|
|
1206
|
+
headers=header_params if header_params else None,
|
|
1207
|
+
context_msg=None,
|
|
1208
|
+
aspects=aspects,
|
|
1209
|
+
)
|
|
1210
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1211
|
+
rtnobj = None
|
|
1212
|
+
else:
|
|
1213
|
+
raw_data = resp.json()
|
|
1214
|
+
rtnobj = CodespacesSecret.from_dict(raw_data)
|
|
1215
|
+
return rtnobj
|
|
1216
|
+
|
|
1217
|
+
def list_devcontainers_in_repository_for_authenticated_user(self, owner: str, repo: str, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
1218
|
+
"""
|
|
1219
|
+
List devcontainer configurations in a repository for the authenticated user
|
|
1220
|
+
|
|
1221
|
+
Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files
|
|
1222
|
+
specify launchpoint configurations for codespaces created within the repository.
|
|
1223
|
+
|
|
1224
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
1225
|
+
"""
|
|
1226
|
+
client = self.client
|
|
1227
|
+
if aspects is None:
|
|
1228
|
+
aspects = client.aspects
|
|
1229
|
+
|
|
1230
|
+
header_params = client.headers
|
|
1231
|
+
if headers is not None:
|
|
1232
|
+
header_params = headers
|
|
1233
|
+
|
|
1234
|
+
leaf_template = "/repos/{owner}/{repo}/codespaces/devcontainers"
|
|
1235
|
+
path_params = {
|
|
1236
|
+
'owner': owner,
|
|
1237
|
+
'repo': repo,
|
|
1238
|
+
}
|
|
1239
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1240
|
+
|
|
1241
|
+
query_params = {}
|
|
1242
|
+
if per_page is not None:
|
|
1243
|
+
query_params['per_page'] = per_page
|
|
1244
|
+
if page is not None:
|
|
1245
|
+
query_params['page'] = page
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
if exp_status is None:
|
|
1249
|
+
exp_status = [200]
|
|
1250
|
+
|
|
1251
|
+
resp = client.perform_call(
|
|
1252
|
+
leaf=call_leaf,
|
|
1253
|
+
method="GET",
|
|
1254
|
+
params=query_params if query_params else None,
|
|
1255
|
+
body=None,
|
|
1256
|
+
exp_status=exp_status,
|
|
1257
|
+
headers=header_params if header_params else None,
|
|
1258
|
+
context_msg=None,
|
|
1259
|
+
aspects=aspects,
|
|
1260
|
+
)
|
|
1261
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1262
|
+
rtnval = None
|
|
1263
|
+
else:
|
|
1264
|
+
raw_data = resp.json()
|
|
1265
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1266
|
+
return rtnval
|
|
1267
|
+
|
|
1268
|
+
def list_for_authenticated_user(self, *, per_page: Optional[int] = 30, page: Optional[int] = 1, repository_id: Optional[int] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
1269
|
+
"""
|
|
1270
|
+
List codespaces for the authenticated user
|
|
1271
|
+
|
|
1272
|
+
Lists the authenticated user's codespaces.
|
|
1273
|
+
|
|
1274
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
1275
|
+
"""
|
|
1276
|
+
client = self.client
|
|
1277
|
+
if aspects is None:
|
|
1278
|
+
aspects = client.aspects
|
|
1279
|
+
|
|
1280
|
+
header_params = client.headers
|
|
1281
|
+
if headers is not None:
|
|
1282
|
+
header_params = headers
|
|
1283
|
+
|
|
1284
|
+
call_leaf = "/user/codespaces"
|
|
1285
|
+
|
|
1286
|
+
query_params = {}
|
|
1287
|
+
if per_page is not None:
|
|
1288
|
+
query_params['per_page'] = per_page
|
|
1289
|
+
if page is not None:
|
|
1290
|
+
query_params['page'] = page
|
|
1291
|
+
if repository_id is not None:
|
|
1292
|
+
query_params['repository_id'] = repository_id
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
if exp_status is None:
|
|
1296
|
+
exp_status = [200]
|
|
1297
|
+
|
|
1298
|
+
resp = client.perform_call(
|
|
1299
|
+
leaf=call_leaf,
|
|
1300
|
+
method="GET",
|
|
1301
|
+
params=query_params if query_params else None,
|
|
1302
|
+
body=None,
|
|
1303
|
+
exp_status=exp_status,
|
|
1304
|
+
headers=header_params if header_params else None,
|
|
1305
|
+
context_msg=None,
|
|
1306
|
+
aspects=aspects,
|
|
1307
|
+
)
|
|
1308
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1309
|
+
rtnval = None
|
|
1310
|
+
else:
|
|
1311
|
+
raw_data = resp.json()
|
|
1312
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1313
|
+
return rtnval
|
|
1314
|
+
|
|
1315
|
+
def list_in_organization(self, org: str, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
1316
|
+
"""
|
|
1317
|
+
List codespaces for the organization
|
|
1318
|
+
|
|
1319
|
+
Lists the codespaces associated to a specified organization.
|
|
1320
|
+
|
|
1321
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
1322
|
+
"""
|
|
1323
|
+
client = self.client
|
|
1324
|
+
if aspects is None:
|
|
1325
|
+
aspects = client.aspects
|
|
1326
|
+
|
|
1327
|
+
header_params = client.headers
|
|
1328
|
+
if headers is not None:
|
|
1329
|
+
header_params = headers
|
|
1330
|
+
|
|
1331
|
+
leaf_template = "/orgs/{org}/codespaces"
|
|
1332
|
+
path_params = {
|
|
1333
|
+
'org': org,
|
|
1334
|
+
}
|
|
1335
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1336
|
+
|
|
1337
|
+
query_params = {}
|
|
1338
|
+
if per_page is not None:
|
|
1339
|
+
query_params['per_page'] = per_page
|
|
1340
|
+
if page is not None:
|
|
1341
|
+
query_params['page'] = page
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
if exp_status is None:
|
|
1345
|
+
exp_status = [200]
|
|
1346
|
+
|
|
1347
|
+
resp = client.perform_call(
|
|
1348
|
+
leaf=call_leaf,
|
|
1349
|
+
method="GET",
|
|
1350
|
+
params=query_params if query_params else None,
|
|
1351
|
+
body=None,
|
|
1352
|
+
exp_status=exp_status,
|
|
1353
|
+
headers=header_params if header_params else None,
|
|
1354
|
+
context_msg=None,
|
|
1355
|
+
aspects=aspects,
|
|
1356
|
+
)
|
|
1357
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1358
|
+
rtnval = None
|
|
1359
|
+
else:
|
|
1360
|
+
raw_data = resp.json()
|
|
1361
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1362
|
+
return rtnval
|
|
1363
|
+
|
|
1364
|
+
def list_in_repository_for_authenticated_user(self, owner: str, repo: str, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
1365
|
+
"""
|
|
1366
|
+
List codespaces in a repository for the authenticated user
|
|
1367
|
+
|
|
1368
|
+
Lists the codespaces associated to a specified repository and the authenticated user.
|
|
1369
|
+
|
|
1370
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
1371
|
+
"""
|
|
1372
|
+
client = self.client
|
|
1373
|
+
if aspects is None:
|
|
1374
|
+
aspects = client.aspects
|
|
1375
|
+
|
|
1376
|
+
header_params = client.headers
|
|
1377
|
+
if headers is not None:
|
|
1378
|
+
header_params = headers
|
|
1379
|
+
|
|
1380
|
+
leaf_template = "/repos/{owner}/{repo}/codespaces"
|
|
1381
|
+
path_params = {
|
|
1382
|
+
'owner': owner,
|
|
1383
|
+
'repo': repo,
|
|
1384
|
+
}
|
|
1385
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1386
|
+
|
|
1387
|
+
query_params = {}
|
|
1388
|
+
if per_page is not None:
|
|
1389
|
+
query_params['per_page'] = per_page
|
|
1390
|
+
if page is not None:
|
|
1391
|
+
query_params['page'] = page
|
|
1392
|
+
|
|
1393
|
+
|
|
1394
|
+
if exp_status is None:
|
|
1395
|
+
exp_status = [200]
|
|
1396
|
+
|
|
1397
|
+
resp = client.perform_call(
|
|
1398
|
+
leaf=call_leaf,
|
|
1399
|
+
method="GET",
|
|
1400
|
+
params=query_params if query_params else None,
|
|
1401
|
+
body=None,
|
|
1402
|
+
exp_status=exp_status,
|
|
1403
|
+
headers=header_params if header_params else None,
|
|
1404
|
+
context_msg=None,
|
|
1405
|
+
aspects=aspects,
|
|
1406
|
+
)
|
|
1407
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1408
|
+
rtnval = None
|
|
1409
|
+
else:
|
|
1410
|
+
raw_data = resp.json()
|
|
1411
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1412
|
+
return rtnval
|
|
1413
|
+
|
|
1414
|
+
def list_org_secrets(self, org: str, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
1415
|
+
"""
|
|
1416
|
+
List organization secrets
|
|
1417
|
+
|
|
1418
|
+
Lists all Codespaces development environment secrets available at the organization-level without revealing their encrypted
|
|
1419
|
+
values.
|
|
1420
|
+
|
|
1421
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
1422
|
+
"""
|
|
1423
|
+
client = self.client
|
|
1424
|
+
if aspects is None:
|
|
1425
|
+
aspects = client.aspects
|
|
1426
|
+
|
|
1427
|
+
header_params = client.headers
|
|
1428
|
+
if headers is not None:
|
|
1429
|
+
header_params = headers
|
|
1430
|
+
|
|
1431
|
+
leaf_template = "/orgs/{org}/codespaces/secrets"
|
|
1432
|
+
path_params = {
|
|
1433
|
+
'org': org,
|
|
1434
|
+
}
|
|
1435
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1436
|
+
|
|
1437
|
+
query_params = {}
|
|
1438
|
+
if per_page is not None:
|
|
1439
|
+
query_params['per_page'] = per_page
|
|
1440
|
+
if page is not None:
|
|
1441
|
+
query_params['page'] = page
|
|
1442
|
+
|
|
1443
|
+
|
|
1444
|
+
if exp_status is None:
|
|
1445
|
+
exp_status = [200]
|
|
1446
|
+
|
|
1447
|
+
resp = client.perform_call(
|
|
1448
|
+
leaf=call_leaf,
|
|
1449
|
+
method="GET",
|
|
1450
|
+
params=query_params if query_params else None,
|
|
1451
|
+
body=None,
|
|
1452
|
+
exp_status=exp_status,
|
|
1453
|
+
headers=header_params if header_params else None,
|
|
1454
|
+
context_msg=None,
|
|
1455
|
+
aspects=aspects,
|
|
1456
|
+
)
|
|
1457
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1458
|
+
rtnval = None
|
|
1459
|
+
else:
|
|
1460
|
+
raw_data = resp.json()
|
|
1461
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1462
|
+
return rtnval
|
|
1463
|
+
|
|
1464
|
+
def list_repo_secrets(self, owner: str, repo: str, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
1465
|
+
"""
|
|
1466
|
+
List repository secrets
|
|
1467
|
+
|
|
1468
|
+
Lists all development environment secrets available in a repository without revealing their encrypted
|
|
1469
|
+
values.
|
|
1470
|
+
|
|
1471
|
+
OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
|
|
1472
|
+
"""
|
|
1473
|
+
client = self.client
|
|
1474
|
+
if aspects is None:
|
|
1475
|
+
aspects = client.aspects
|
|
1476
|
+
|
|
1477
|
+
header_params = client.headers
|
|
1478
|
+
if headers is not None:
|
|
1479
|
+
header_params = headers
|
|
1480
|
+
|
|
1481
|
+
leaf_template = "/repos/{owner}/{repo}/codespaces/secrets"
|
|
1482
|
+
path_params = {
|
|
1483
|
+
'owner': owner,
|
|
1484
|
+
'repo': repo,
|
|
1485
|
+
}
|
|
1486
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1487
|
+
|
|
1488
|
+
query_params = {}
|
|
1489
|
+
if per_page is not None:
|
|
1490
|
+
query_params['per_page'] = per_page
|
|
1491
|
+
if page is not None:
|
|
1492
|
+
query_params['page'] = page
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
if exp_status is None:
|
|
1496
|
+
exp_status = [200]
|
|
1497
|
+
|
|
1498
|
+
resp = client.perform_call(
|
|
1499
|
+
leaf=call_leaf,
|
|
1500
|
+
method="GET",
|
|
1501
|
+
params=query_params if query_params else None,
|
|
1502
|
+
body=None,
|
|
1503
|
+
exp_status=exp_status,
|
|
1504
|
+
headers=header_params if header_params else None,
|
|
1505
|
+
context_msg=None,
|
|
1506
|
+
aspects=aspects,
|
|
1507
|
+
)
|
|
1508
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1509
|
+
rtnval = None
|
|
1510
|
+
else:
|
|
1511
|
+
raw_data = resp.json()
|
|
1512
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1513
|
+
return rtnval
|
|
1514
|
+
|
|
1515
|
+
def list_repositories_for_secret_for_authenticated_user(self, secret_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
1516
|
+
"""
|
|
1517
|
+
List selected repositories for a user secret
|
|
1518
|
+
|
|
1519
|
+
List the repositories that have been granted the ability to use a user's development environment secret.
|
|
1520
|
+
|
|
1521
|
+
The authenticated user must have Codespaces access to use this endpoint.
|
|
1522
|
+
|
|
1523
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint.
|
|
1524
|
+
"""
|
|
1525
|
+
client = self.client
|
|
1526
|
+
if aspects is None:
|
|
1527
|
+
aspects = client.aspects
|
|
1528
|
+
|
|
1529
|
+
header_params = client.headers
|
|
1530
|
+
if headers is not None:
|
|
1531
|
+
header_params = headers
|
|
1532
|
+
|
|
1533
|
+
leaf_template = "/user/codespaces/secrets/{secret_name}/repositories"
|
|
1534
|
+
path_params = {
|
|
1535
|
+
'secret_name': secret_name,
|
|
1536
|
+
}
|
|
1537
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1538
|
+
|
|
1539
|
+
query_params = None
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
if exp_status is None:
|
|
1543
|
+
exp_status = [200]
|
|
1544
|
+
|
|
1545
|
+
resp = client.perform_call(
|
|
1546
|
+
leaf=call_leaf,
|
|
1547
|
+
method="GET",
|
|
1548
|
+
params=query_params if query_params else None,
|
|
1549
|
+
body=None,
|
|
1550
|
+
exp_status=exp_status,
|
|
1551
|
+
headers=header_params if header_params else None,
|
|
1552
|
+
context_msg=None,
|
|
1553
|
+
aspects=aspects,
|
|
1554
|
+
)
|
|
1555
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1556
|
+
rtnval = None
|
|
1557
|
+
else:
|
|
1558
|
+
raw_data = resp.json()
|
|
1559
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1560
|
+
return rtnval
|
|
1561
|
+
|
|
1562
|
+
def list_secrets_for_authenticated_user(self, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
1563
|
+
"""
|
|
1564
|
+
List secrets for the authenticated user
|
|
1565
|
+
|
|
1566
|
+
Lists all development environment secrets available for a user's codespaces without revealing their
|
|
1567
|
+
encrypted values.
|
|
1568
|
+
|
|
1569
|
+
The authenticated user must have Codespaces access to use this endpoint.
|
|
1570
|
+
|
|
1571
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint.
|
|
1572
|
+
"""
|
|
1573
|
+
client = self.client
|
|
1574
|
+
if aspects is None:
|
|
1575
|
+
aspects = client.aspects
|
|
1576
|
+
|
|
1577
|
+
header_params = client.headers
|
|
1578
|
+
if headers is not None:
|
|
1579
|
+
header_params = headers
|
|
1580
|
+
|
|
1581
|
+
call_leaf = "/user/codespaces/secrets"
|
|
1582
|
+
|
|
1583
|
+
query_params = {}
|
|
1584
|
+
if per_page is not None:
|
|
1585
|
+
query_params['per_page'] = per_page
|
|
1586
|
+
if page is not None:
|
|
1587
|
+
query_params['page'] = page
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
if exp_status is None:
|
|
1591
|
+
exp_status = [200]
|
|
1592
|
+
|
|
1593
|
+
resp = client.perform_call(
|
|
1594
|
+
leaf=call_leaf,
|
|
1595
|
+
method="GET",
|
|
1596
|
+
params=query_params if query_params else None,
|
|
1597
|
+
body=None,
|
|
1598
|
+
exp_status=exp_status,
|
|
1599
|
+
headers=header_params if header_params else None,
|
|
1600
|
+
context_msg=None,
|
|
1601
|
+
aspects=aspects,
|
|
1602
|
+
)
|
|
1603
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1604
|
+
rtnval = None
|
|
1605
|
+
else:
|
|
1606
|
+
raw_data = resp.json()
|
|
1607
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1608
|
+
return rtnval
|
|
1609
|
+
|
|
1610
|
+
def list_selected_repos_for_org_secret(self, org: str, secret_name: str, *, page: Optional[int] = 1, per_page: Optional[int] = 30, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
1611
|
+
"""
|
|
1612
|
+
List selected repositories for an organization secret
|
|
1613
|
+
|
|
1614
|
+
Lists all repositories that have been selected when the `visibility`
|
|
1615
|
+
for repository access to a secret is set to `selected`.
|
|
1616
|
+
|
|
1617
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
1618
|
+
"""
|
|
1619
|
+
client = self.client
|
|
1620
|
+
if aspects is None:
|
|
1621
|
+
aspects = client.aspects
|
|
1622
|
+
|
|
1623
|
+
header_params = client.headers
|
|
1624
|
+
if headers is not None:
|
|
1625
|
+
header_params = headers
|
|
1626
|
+
|
|
1627
|
+
leaf_template = "/orgs/{org}/codespaces/secrets/{secret_name}/repositories"
|
|
1628
|
+
path_params = {
|
|
1629
|
+
'org': org,
|
|
1630
|
+
'secret_name': secret_name,
|
|
1631
|
+
}
|
|
1632
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1633
|
+
|
|
1634
|
+
query_params = {}
|
|
1635
|
+
if page is not None:
|
|
1636
|
+
query_params['page'] = page
|
|
1637
|
+
if per_page is not None:
|
|
1638
|
+
query_params['per_page'] = per_page
|
|
1639
|
+
|
|
1640
|
+
|
|
1641
|
+
if exp_status is None:
|
|
1642
|
+
exp_status = [200]
|
|
1643
|
+
|
|
1644
|
+
resp = client.perform_call(
|
|
1645
|
+
leaf=call_leaf,
|
|
1646
|
+
method="GET",
|
|
1647
|
+
params=query_params if query_params else None,
|
|
1648
|
+
body=None,
|
|
1649
|
+
exp_status=exp_status,
|
|
1650
|
+
headers=header_params if header_params else None,
|
|
1651
|
+
context_msg=None,
|
|
1652
|
+
aspects=aspects,
|
|
1653
|
+
)
|
|
1654
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1655
|
+
rtnval = None
|
|
1656
|
+
else:
|
|
1657
|
+
raw_data = resp.json()
|
|
1658
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1659
|
+
return rtnval
|
|
1660
|
+
|
|
1661
|
+
def pre_flight_with_repo_for_authenticated_user(self, owner: str, repo: str, *, ref: Optional[str] = None, client_ip: Optional[str] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
1662
|
+
"""
|
|
1663
|
+
Get default attributes for a codespace
|
|
1664
|
+
|
|
1665
|
+
Gets the default attributes for codespaces created by the user with the repository.
|
|
1666
|
+
|
|
1667
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
1668
|
+
"""
|
|
1669
|
+
client = self.client
|
|
1670
|
+
if aspects is None:
|
|
1671
|
+
aspects = client.aspects
|
|
1672
|
+
|
|
1673
|
+
header_params = client.headers
|
|
1674
|
+
if headers is not None:
|
|
1675
|
+
header_params = headers
|
|
1676
|
+
|
|
1677
|
+
leaf_template = "/repos/{owner}/{repo}/codespaces/new"
|
|
1678
|
+
path_params = {
|
|
1679
|
+
'owner': owner,
|
|
1680
|
+
'repo': repo,
|
|
1681
|
+
}
|
|
1682
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1683
|
+
|
|
1684
|
+
query_params = {}
|
|
1685
|
+
if ref is not None:
|
|
1686
|
+
query_params['ref'] = ref
|
|
1687
|
+
if client_ip is not None:
|
|
1688
|
+
query_params['client_ip'] = client_ip
|
|
1689
|
+
|
|
1690
|
+
|
|
1691
|
+
if exp_status is None:
|
|
1692
|
+
exp_status = [200]
|
|
1693
|
+
|
|
1694
|
+
resp = client.perform_call(
|
|
1695
|
+
leaf=call_leaf,
|
|
1696
|
+
method="GET",
|
|
1697
|
+
params=query_params if query_params else None,
|
|
1698
|
+
body=None,
|
|
1699
|
+
exp_status=exp_status,
|
|
1700
|
+
headers=header_params if header_params else None,
|
|
1701
|
+
context_msg=None,
|
|
1702
|
+
aspects=aspects,
|
|
1703
|
+
)
|
|
1704
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1705
|
+
rtnval = None
|
|
1706
|
+
else:
|
|
1707
|
+
raw_data = resp.json()
|
|
1708
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1709
|
+
return rtnval
|
|
1710
|
+
|
|
1711
|
+
def publish_for_authenticated_user(self, codespace_name: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
1712
|
+
"""
|
|
1713
|
+
Create a repository from an unpublished codespace
|
|
1714
|
+
|
|
1715
|
+
Publishes an unpublished codespace, creating a new repository and assigning it to the codespace.
|
|
1716
|
+
|
|
1717
|
+
The codespace's token is granted write permissions to the repository, allowing the user to push their changes.
|
|
1718
|
+
|
|
1719
|
+
This will fail for a codespace that is already published, meaning it has an associated repository.
|
|
1720
|
+
|
|
1721
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
1722
|
+
"""
|
|
1723
|
+
client = self.client
|
|
1724
|
+
if aspects is None:
|
|
1725
|
+
aspects = client.aspects
|
|
1726
|
+
|
|
1727
|
+
header_params = client.headers
|
|
1728
|
+
if headers is not None:
|
|
1729
|
+
header_params = headers
|
|
1730
|
+
|
|
1731
|
+
leaf_template = "/user/codespaces/{codespace_name}/publish"
|
|
1732
|
+
path_params = {
|
|
1733
|
+
'codespace_name': codespace_name,
|
|
1734
|
+
}
|
|
1735
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1736
|
+
|
|
1737
|
+
query_params = None
|
|
1738
|
+
|
|
1739
|
+
|
|
1740
|
+
if exp_status is None:
|
|
1741
|
+
exp_status = [201]
|
|
1742
|
+
|
|
1743
|
+
resp = client.perform_call(
|
|
1744
|
+
leaf=call_leaf,
|
|
1745
|
+
method="POST",
|
|
1746
|
+
params=query_params if query_params else None,
|
|
1747
|
+
body=body,
|
|
1748
|
+
exp_status=exp_status,
|
|
1749
|
+
headers=header_params if header_params else None,
|
|
1750
|
+
context_msg=None,
|
|
1751
|
+
aspects=aspects,
|
|
1752
|
+
)
|
|
1753
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1754
|
+
rtnval = None
|
|
1755
|
+
else:
|
|
1756
|
+
rtnval = resp.json()
|
|
1757
|
+
return rtnval
|
|
1758
|
+
|
|
1759
|
+
def remove_repository_for_secret_for_authenticated_user(self, secret_name: str, repository_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
1760
|
+
"""
|
|
1761
|
+
Remove a selected repository from a user secret
|
|
1762
|
+
|
|
1763
|
+
Removes a repository from the selected repositories for a user's development environment secret.
|
|
1764
|
+
|
|
1765
|
+
The authenticated user must have Codespaces access to use this endpoint.
|
|
1766
|
+
|
|
1767
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint.
|
|
1768
|
+
"""
|
|
1769
|
+
client = self.client
|
|
1770
|
+
if aspects is None:
|
|
1771
|
+
aspects = client.aspects
|
|
1772
|
+
|
|
1773
|
+
header_params = client.headers
|
|
1774
|
+
if headers is not None:
|
|
1775
|
+
header_params = headers
|
|
1776
|
+
|
|
1777
|
+
leaf_template = "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}"
|
|
1778
|
+
path_params = {
|
|
1779
|
+
'secret_name': secret_name,
|
|
1780
|
+
'repository_id': repository_id,
|
|
1781
|
+
}
|
|
1782
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1783
|
+
|
|
1784
|
+
query_params = None
|
|
1785
|
+
|
|
1786
|
+
|
|
1787
|
+
if exp_status is None:
|
|
1788
|
+
exp_status = [204]
|
|
1789
|
+
|
|
1790
|
+
resp = client.perform_call(
|
|
1791
|
+
leaf=call_leaf,
|
|
1792
|
+
method="DELETE",
|
|
1793
|
+
params=query_params if query_params else None,
|
|
1794
|
+
body=None,
|
|
1795
|
+
exp_status=exp_status,
|
|
1796
|
+
headers=header_params if header_params else None,
|
|
1797
|
+
context_msg=None,
|
|
1798
|
+
aspects=aspects,
|
|
1799
|
+
)
|
|
1800
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1801
|
+
rtnval = None
|
|
1802
|
+
else:
|
|
1803
|
+
rtnval = resp.json()
|
|
1804
|
+
return rtnval
|
|
1805
|
+
|
|
1806
|
+
def remove_selected_repo_from_org_secret(self, org: str, secret_name: str, repository_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
1807
|
+
"""
|
|
1808
|
+
Remove selected repository from an organization secret
|
|
1809
|
+
|
|
1810
|
+
Removes a repository from an organization development environment secret when the `visibility`
|
|
1811
|
+
for repository access is set to `selected`. The visibility is set when you [Create
|
|
1812
|
+
or update an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#create-or-update-an-organization-secret).
|
|
1813
|
+
|
|
1814
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
1815
|
+
"""
|
|
1816
|
+
client = self.client
|
|
1817
|
+
if aspects is None:
|
|
1818
|
+
aspects = client.aspects
|
|
1819
|
+
|
|
1820
|
+
header_params = client.headers
|
|
1821
|
+
if headers is not None:
|
|
1822
|
+
header_params = headers
|
|
1823
|
+
|
|
1824
|
+
leaf_template = "/orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"
|
|
1825
|
+
path_params = {
|
|
1826
|
+
'org': org,
|
|
1827
|
+
'secret_name': secret_name,
|
|
1828
|
+
'repository_id': repository_id,
|
|
1829
|
+
}
|
|
1830
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1831
|
+
|
|
1832
|
+
query_params = None
|
|
1833
|
+
|
|
1834
|
+
|
|
1835
|
+
if exp_status is None:
|
|
1836
|
+
exp_status = [204]
|
|
1837
|
+
|
|
1838
|
+
resp = client.perform_call(
|
|
1839
|
+
leaf=call_leaf,
|
|
1840
|
+
method="DELETE",
|
|
1841
|
+
params=query_params if query_params else None,
|
|
1842
|
+
body=None,
|
|
1843
|
+
exp_status=exp_status,
|
|
1844
|
+
headers=header_params if header_params else None,
|
|
1845
|
+
context_msg=None,
|
|
1846
|
+
aspects=aspects,
|
|
1847
|
+
)
|
|
1848
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1849
|
+
rtnval = None
|
|
1850
|
+
else:
|
|
1851
|
+
rtnval = resp.json()
|
|
1852
|
+
return rtnval
|
|
1853
|
+
|
|
1854
|
+
def repo_machines_for_authenticated_user(self, owner: str, repo: str, *, location: Optional[str] = None, client_ip: Optional[str] = None, ref: Optional[str] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
1855
|
+
"""
|
|
1856
|
+
List available machine types for a repository
|
|
1857
|
+
|
|
1858
|
+
List the machine types available for a given repository based on its configuration.
|
|
1859
|
+
|
|
1860
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
1861
|
+
"""
|
|
1862
|
+
client = self.client
|
|
1863
|
+
if aspects is None:
|
|
1864
|
+
aspects = client.aspects
|
|
1865
|
+
|
|
1866
|
+
header_params = client.headers
|
|
1867
|
+
if headers is not None:
|
|
1868
|
+
header_params = headers
|
|
1869
|
+
|
|
1870
|
+
leaf_template = "/repos/{owner}/{repo}/codespaces/machines"
|
|
1871
|
+
path_params = {
|
|
1872
|
+
'owner': owner,
|
|
1873
|
+
'repo': repo,
|
|
1874
|
+
}
|
|
1875
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1876
|
+
|
|
1877
|
+
query_params = {}
|
|
1878
|
+
if location is not None:
|
|
1879
|
+
query_params['location'] = location
|
|
1880
|
+
if client_ip is not None:
|
|
1881
|
+
query_params['client_ip'] = client_ip
|
|
1882
|
+
if ref is not None:
|
|
1883
|
+
query_params['ref'] = ref
|
|
1884
|
+
|
|
1885
|
+
|
|
1886
|
+
if exp_status is None:
|
|
1887
|
+
exp_status = [200]
|
|
1888
|
+
|
|
1889
|
+
resp = client.perform_call(
|
|
1890
|
+
leaf=call_leaf,
|
|
1891
|
+
method="GET",
|
|
1892
|
+
params=query_params if query_params else None,
|
|
1893
|
+
body=None,
|
|
1894
|
+
exp_status=exp_status,
|
|
1895
|
+
headers=header_params if header_params else None,
|
|
1896
|
+
context_msg=None,
|
|
1897
|
+
aspects=aspects,
|
|
1898
|
+
)
|
|
1899
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1900
|
+
rtnval = None
|
|
1901
|
+
else:
|
|
1902
|
+
raw_data = resp.json()
|
|
1903
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1904
|
+
return rtnval
|
|
1905
|
+
|
|
1906
|
+
def set_codespaces_access(self, org: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
1907
|
+
"""
|
|
1908
|
+
Manage access control for organization codespaces
|
|
1909
|
+
|
|
1910
|
+
Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces access permissions for users according to the visibility.
|
|
1911
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
1912
|
+
"""
|
|
1913
|
+
client = self.client
|
|
1914
|
+
if aspects is None:
|
|
1915
|
+
aspects = client.aspects
|
|
1916
|
+
|
|
1917
|
+
header_params = client.headers
|
|
1918
|
+
if headers is not None:
|
|
1919
|
+
header_params = headers
|
|
1920
|
+
|
|
1921
|
+
leaf_template = "/orgs/{org}/codespaces/access"
|
|
1922
|
+
path_params = {
|
|
1923
|
+
'org': org,
|
|
1924
|
+
}
|
|
1925
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1926
|
+
|
|
1927
|
+
query_params = None
|
|
1928
|
+
|
|
1929
|
+
|
|
1930
|
+
if exp_status is None:
|
|
1931
|
+
exp_status = [204]
|
|
1932
|
+
|
|
1933
|
+
resp = client.perform_call(
|
|
1934
|
+
leaf=call_leaf,
|
|
1935
|
+
method="PUT",
|
|
1936
|
+
params=query_params if query_params else None,
|
|
1937
|
+
body=body,
|
|
1938
|
+
exp_status=exp_status,
|
|
1939
|
+
headers=header_params if header_params else None,
|
|
1940
|
+
context_msg=None,
|
|
1941
|
+
aspects=aspects,
|
|
1942
|
+
)
|
|
1943
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1944
|
+
rtnval = None
|
|
1945
|
+
else:
|
|
1946
|
+
rtnval = resp.json()
|
|
1947
|
+
return rtnval
|
|
1948
|
+
|
|
1949
|
+
def set_codespaces_access_users(self, org: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
1950
|
+
"""
|
|
1951
|
+
Add users to Codespaces access for an organization
|
|
1952
|
+
|
|
1953
|
+
Codespaces for the specified users will be billed to the organization.
|
|
1954
|
+
|
|
1955
|
+
To use this endpoint, the access settings for the organization must be set to `selected_members`.
|
|
1956
|
+
For information on how to change this setting, see "[Manage access control for organization codespaces](https://docs.github.com/rest/codespaces/organizations#manage-access-control-for-organization-codespaces)."
|
|
1957
|
+
|
|
1958
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
1959
|
+
"""
|
|
1960
|
+
client = self.client
|
|
1961
|
+
if aspects is None:
|
|
1962
|
+
aspects = client.aspects
|
|
1963
|
+
|
|
1964
|
+
header_params = client.headers
|
|
1965
|
+
if headers is not None:
|
|
1966
|
+
header_params = headers
|
|
1967
|
+
|
|
1968
|
+
leaf_template = "/orgs/{org}/codespaces/access/selected_users"
|
|
1969
|
+
path_params = {
|
|
1970
|
+
'org': org,
|
|
1971
|
+
}
|
|
1972
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1973
|
+
|
|
1974
|
+
query_params = None
|
|
1975
|
+
|
|
1976
|
+
|
|
1977
|
+
if exp_status is None:
|
|
1978
|
+
exp_status = [204]
|
|
1979
|
+
|
|
1980
|
+
resp = client.perform_call(
|
|
1981
|
+
leaf=call_leaf,
|
|
1982
|
+
method="POST",
|
|
1983
|
+
params=query_params if query_params else None,
|
|
1984
|
+
body=body,
|
|
1985
|
+
exp_status=exp_status,
|
|
1986
|
+
headers=header_params if header_params else None,
|
|
1987
|
+
context_msg=None,
|
|
1988
|
+
aspects=aspects,
|
|
1989
|
+
)
|
|
1990
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1991
|
+
rtnval = None
|
|
1992
|
+
else:
|
|
1993
|
+
rtnval = resp.json()
|
|
1994
|
+
return rtnval
|
|
1995
|
+
|
|
1996
|
+
def set_repositories_for_secret_for_authenticated_user(self, secret_name: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
1997
|
+
"""
|
|
1998
|
+
Set selected repositories for a user secret
|
|
1999
|
+
|
|
2000
|
+
Select the repositories that will use a user's development environment secret.
|
|
2001
|
+
|
|
2002
|
+
The authenticated user must have Codespaces access to use this endpoint.
|
|
2003
|
+
|
|
2004
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint.
|
|
2005
|
+
"""
|
|
2006
|
+
client = self.client
|
|
2007
|
+
if aspects is None:
|
|
2008
|
+
aspects = client.aspects
|
|
2009
|
+
|
|
2010
|
+
header_params = client.headers
|
|
2011
|
+
if headers is not None:
|
|
2012
|
+
header_params = headers
|
|
2013
|
+
|
|
2014
|
+
leaf_template = "/user/codespaces/secrets/{secret_name}/repositories"
|
|
2015
|
+
path_params = {
|
|
2016
|
+
'secret_name': secret_name,
|
|
2017
|
+
}
|
|
2018
|
+
call_leaf = leaf_template.format(**path_params)
|
|
2019
|
+
|
|
2020
|
+
query_params = None
|
|
2021
|
+
|
|
2022
|
+
|
|
2023
|
+
if exp_status is None:
|
|
2024
|
+
exp_status = [204]
|
|
2025
|
+
|
|
2026
|
+
resp = client.perform_call(
|
|
2027
|
+
leaf=call_leaf,
|
|
2028
|
+
method="PUT",
|
|
2029
|
+
params=query_params if query_params else None,
|
|
2030
|
+
body=body,
|
|
2031
|
+
exp_status=exp_status,
|
|
2032
|
+
headers=header_params if header_params else None,
|
|
2033
|
+
context_msg=None,
|
|
2034
|
+
aspects=aspects,
|
|
2035
|
+
)
|
|
2036
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
2037
|
+
rtnval = None
|
|
2038
|
+
else:
|
|
2039
|
+
rtnval = resp.json()
|
|
2040
|
+
return rtnval
|
|
2041
|
+
|
|
2042
|
+
def set_selected_repos_for_org_secret(self, org: str, secret_name: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
2043
|
+
"""
|
|
2044
|
+
Set selected repositories for an organization secret
|
|
2045
|
+
|
|
2046
|
+
Replaces all repositories for an organization development environment secret when the `visibility`
|
|
2047
|
+
for repository access is set to `selected`. The visibility is set when you [Create
|
|
2048
|
+
or update an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#create-or-update-an-organization-secret).
|
|
2049
|
+
|
|
2050
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
2051
|
+
"""
|
|
2052
|
+
client = self.client
|
|
2053
|
+
if aspects is None:
|
|
2054
|
+
aspects = client.aspects
|
|
2055
|
+
|
|
2056
|
+
header_params = client.headers
|
|
2057
|
+
if headers is not None:
|
|
2058
|
+
header_params = headers
|
|
2059
|
+
|
|
2060
|
+
leaf_template = "/orgs/{org}/codespaces/secrets/{secret_name}/repositories"
|
|
2061
|
+
path_params = {
|
|
2062
|
+
'org': org,
|
|
2063
|
+
'secret_name': secret_name,
|
|
2064
|
+
}
|
|
2065
|
+
call_leaf = leaf_template.format(**path_params)
|
|
2066
|
+
|
|
2067
|
+
query_params = None
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
if exp_status is None:
|
|
2071
|
+
exp_status = [204]
|
|
2072
|
+
|
|
2073
|
+
resp = client.perform_call(
|
|
2074
|
+
leaf=call_leaf,
|
|
2075
|
+
method="PUT",
|
|
2076
|
+
params=query_params if query_params else None,
|
|
2077
|
+
body=body,
|
|
2078
|
+
exp_status=exp_status,
|
|
2079
|
+
headers=header_params if header_params else None,
|
|
2080
|
+
context_msg=None,
|
|
2081
|
+
aspects=aspects,
|
|
2082
|
+
)
|
|
2083
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
2084
|
+
rtnval = None
|
|
2085
|
+
else:
|
|
2086
|
+
rtnval = resp.json()
|
|
2087
|
+
return rtnval
|
|
2088
|
+
|
|
2089
|
+
def start_for_authenticated_user(self, codespace_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Codespace:
|
|
2090
|
+
"""
|
|
2091
|
+
Start a codespace for the authenticated user
|
|
2092
|
+
|
|
2093
|
+
Starts a user's codespace.
|
|
2094
|
+
|
|
2095
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
2096
|
+
"""
|
|
2097
|
+
client = self.client
|
|
2098
|
+
if aspects is None:
|
|
2099
|
+
aspects = client.aspects
|
|
2100
|
+
|
|
2101
|
+
header_params = client.headers
|
|
2102
|
+
if headers is not None:
|
|
2103
|
+
header_params = headers
|
|
2104
|
+
|
|
2105
|
+
leaf_template = "/user/codespaces/{codespace_name}/start"
|
|
2106
|
+
path_params = {
|
|
2107
|
+
'codespace_name': codespace_name,
|
|
2108
|
+
}
|
|
2109
|
+
call_leaf = leaf_template.format(**path_params)
|
|
2110
|
+
|
|
2111
|
+
query_params = None
|
|
2112
|
+
|
|
2113
|
+
|
|
2114
|
+
if exp_status is None:
|
|
2115
|
+
exp_status = [200]
|
|
2116
|
+
|
|
2117
|
+
resp = client.perform_call(
|
|
2118
|
+
leaf=call_leaf,
|
|
2119
|
+
method="POST",
|
|
2120
|
+
params=query_params if query_params else None,
|
|
2121
|
+
body=None,
|
|
2122
|
+
exp_status=exp_status,
|
|
2123
|
+
headers=header_params if header_params else None,
|
|
2124
|
+
context_msg=None,
|
|
2125
|
+
aspects=aspects,
|
|
2126
|
+
)
|
|
2127
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
2128
|
+
rtnobj = None
|
|
2129
|
+
else:
|
|
2130
|
+
raw_data = resp.json()
|
|
2131
|
+
rtnobj = Codespace.from_dict(raw_data)
|
|
2132
|
+
return rtnobj
|
|
2133
|
+
|
|
2134
|
+
def stop_for_authenticated_user(self, codespace_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Codespace:
|
|
2135
|
+
"""
|
|
2136
|
+
Stop a codespace for the authenticated user
|
|
2137
|
+
|
|
2138
|
+
Stops a user's codespace.
|
|
2139
|
+
|
|
2140
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
2141
|
+
"""
|
|
2142
|
+
client = self.client
|
|
2143
|
+
if aspects is None:
|
|
2144
|
+
aspects = client.aspects
|
|
2145
|
+
|
|
2146
|
+
header_params = client.headers
|
|
2147
|
+
if headers is not None:
|
|
2148
|
+
header_params = headers
|
|
2149
|
+
|
|
2150
|
+
leaf_template = "/user/codespaces/{codespace_name}/stop"
|
|
2151
|
+
path_params = {
|
|
2152
|
+
'codespace_name': codespace_name,
|
|
2153
|
+
}
|
|
2154
|
+
call_leaf = leaf_template.format(**path_params)
|
|
2155
|
+
|
|
2156
|
+
query_params = None
|
|
2157
|
+
|
|
2158
|
+
|
|
2159
|
+
if exp_status is None:
|
|
2160
|
+
exp_status = [200]
|
|
2161
|
+
|
|
2162
|
+
resp = client.perform_call(
|
|
2163
|
+
leaf=call_leaf,
|
|
2164
|
+
method="POST",
|
|
2165
|
+
params=query_params if query_params else None,
|
|
2166
|
+
body=None,
|
|
2167
|
+
exp_status=exp_status,
|
|
2168
|
+
headers=header_params if header_params else None,
|
|
2169
|
+
context_msg=None,
|
|
2170
|
+
aspects=aspects,
|
|
2171
|
+
)
|
|
2172
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
2173
|
+
rtnobj = None
|
|
2174
|
+
else:
|
|
2175
|
+
raw_data = resp.json()
|
|
2176
|
+
rtnobj = Codespace.from_dict(raw_data)
|
|
2177
|
+
return rtnobj
|
|
2178
|
+
|
|
2179
|
+
def stop_in_organization(self, org: str, username: str, codespace_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Codespace:
|
|
2180
|
+
"""
|
|
2181
|
+
Stop a codespace for an organization user
|
|
2182
|
+
|
|
2183
|
+
Stops a user's codespace.
|
|
2184
|
+
|
|
2185
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
|
|
2186
|
+
"""
|
|
2187
|
+
client = self.client
|
|
2188
|
+
if aspects is None:
|
|
2189
|
+
aspects = client.aspects
|
|
2190
|
+
|
|
2191
|
+
header_params = client.headers
|
|
2192
|
+
if headers is not None:
|
|
2193
|
+
header_params = headers
|
|
2194
|
+
|
|
2195
|
+
leaf_template = "/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"
|
|
2196
|
+
path_params = {
|
|
2197
|
+
'org': org,
|
|
2198
|
+
'username': username,
|
|
2199
|
+
'codespace_name': codespace_name,
|
|
2200
|
+
}
|
|
2201
|
+
call_leaf = leaf_template.format(**path_params)
|
|
2202
|
+
|
|
2203
|
+
query_params = None
|
|
2204
|
+
|
|
2205
|
+
|
|
2206
|
+
if exp_status is None:
|
|
2207
|
+
exp_status = [200]
|
|
2208
|
+
|
|
2209
|
+
resp = client.perform_call(
|
|
2210
|
+
leaf=call_leaf,
|
|
2211
|
+
method="POST",
|
|
2212
|
+
params=query_params if query_params else None,
|
|
2213
|
+
body=None,
|
|
2214
|
+
exp_status=exp_status,
|
|
2215
|
+
headers=header_params if header_params else None,
|
|
2216
|
+
context_msg=None,
|
|
2217
|
+
aspects=aspects,
|
|
2218
|
+
)
|
|
2219
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
2220
|
+
rtnobj = None
|
|
2221
|
+
else:
|
|
2222
|
+
raw_data = resp.json()
|
|
2223
|
+
rtnobj = Codespace.from_dict(raw_data)
|
|
2224
|
+
return rtnobj
|
|
2225
|
+
|
|
2226
|
+
def update_for_authenticated_user(self, codespace_name: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Codespace:
|
|
2227
|
+
"""
|
|
2228
|
+
Update a codespace for the authenticated user
|
|
2229
|
+
|
|
2230
|
+
Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint.
|
|
2231
|
+
|
|
2232
|
+
If you specify a new machine type it will be applied the next time your codespace is started.
|
|
2233
|
+
|
|
2234
|
+
OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.
|
|
2235
|
+
"""
|
|
2236
|
+
client = self.client
|
|
2237
|
+
if aspects is None:
|
|
2238
|
+
aspects = client.aspects
|
|
2239
|
+
|
|
2240
|
+
header_params = client.headers
|
|
2241
|
+
if headers is not None:
|
|
2242
|
+
header_params = headers
|
|
2243
|
+
|
|
2244
|
+
leaf_template = "/user/codespaces/{codespace_name}"
|
|
2245
|
+
path_params = {
|
|
2246
|
+
'codespace_name': codespace_name,
|
|
2247
|
+
}
|
|
2248
|
+
call_leaf = leaf_template.format(**path_params)
|
|
2249
|
+
|
|
2250
|
+
query_params = None
|
|
2251
|
+
|
|
2252
|
+
|
|
2253
|
+
if exp_status is None:
|
|
2254
|
+
exp_status = [200]
|
|
2255
|
+
|
|
2256
|
+
resp = client.perform_call(
|
|
2257
|
+
leaf=call_leaf,
|
|
2258
|
+
method="PATCH",
|
|
2259
|
+
params=query_params if query_params else None,
|
|
2260
|
+
body=body,
|
|
2261
|
+
exp_status=exp_status,
|
|
2262
|
+
headers=header_params if header_params else None,
|
|
2263
|
+
context_msg=None,
|
|
2264
|
+
aspects=aspects,
|
|
2265
|
+
)
|
|
2266
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
2267
|
+
rtnobj = None
|
|
2268
|
+
else:
|
|
2269
|
+
raw_data = resp.json()
|
|
2270
|
+
rtnobj = Codespace.from_dict(raw_data)
|
|
2271
|
+
return rtnobj
|