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,1662 @@
|
|
|
1
|
+
# Auto-generated by RestClientGenerator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Any, Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from ccai.restclient.base.aspectsrest import AspectsRest
|
|
6
|
+
from ccai.restclient.base.pagedlist import PagedList
|
|
7
|
+
from ccai.restclient.base.restapigroup import RestApiGroup
|
|
8
|
+
from ccai.restclient.github.public.schemas.apps import Authorization
|
|
9
|
+
from ccai.restclient.github.public.schemas.apps import IntegrationInstallationRequest
|
|
10
|
+
from ccai.restclient.github.public.schemas.apps import MarketplaceListingPlan
|
|
11
|
+
from ccai.restclient.github.public.schemas.apps import MarketplacePurchase
|
|
12
|
+
from ccai.restclient.github.public.schemas.apps import UserMarketplacePurchase
|
|
13
|
+
from ccai.restclient.github.public.schemas.apps import WebhookConfig
|
|
14
|
+
from ccai.restclient.github.public.schemas.hookdelivery import HookDelivery
|
|
15
|
+
from ccai.restclient.github.public.schemas.hookdeliveryitem import HookDeliveryItem
|
|
16
|
+
from ccai.restclient.github.public.schemas.installation import Installation
|
|
17
|
+
from ccai.restclient.github.public.schemas.repos import Integration
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class AppsApiGroup(RestApiGroup):
|
|
21
|
+
"""
|
|
22
|
+
Information for integrations and installations.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
def add_repo_to_installation_for_authenticated_user(self, installation_id: int, repository_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
26
|
+
"""
|
|
27
|
+
Add a repository to an app installation
|
|
28
|
+
|
|
29
|
+
Add a single repository to an installation. The authenticated user must have admin access to the repository.
|
|
30
|
+
|
|
31
|
+
This endpoint only works for PATs (classic) with the `repo` scope.
|
|
32
|
+
"""
|
|
33
|
+
client = self.client
|
|
34
|
+
if aspects is None:
|
|
35
|
+
aspects = client.aspects
|
|
36
|
+
|
|
37
|
+
header_params = client.headers
|
|
38
|
+
if headers is not None:
|
|
39
|
+
header_params = headers
|
|
40
|
+
|
|
41
|
+
leaf_template = "/user/installations/{installation_id}/repositories/{repository_id}"
|
|
42
|
+
path_params = {
|
|
43
|
+
'installation_id': installation_id,
|
|
44
|
+
'repository_id': repository_id,
|
|
45
|
+
}
|
|
46
|
+
call_leaf = leaf_template.format(**path_params)
|
|
47
|
+
|
|
48
|
+
query_params = None
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
if exp_status is None:
|
|
52
|
+
exp_status = [204]
|
|
53
|
+
|
|
54
|
+
resp = client.perform_call(
|
|
55
|
+
leaf=call_leaf,
|
|
56
|
+
method="PUT",
|
|
57
|
+
params=query_params if query_params else None,
|
|
58
|
+
body=None,
|
|
59
|
+
exp_status=exp_status,
|
|
60
|
+
headers=header_params if header_params else None,
|
|
61
|
+
context_msg=None,
|
|
62
|
+
aspects=aspects,
|
|
63
|
+
)
|
|
64
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
65
|
+
rtnval = None
|
|
66
|
+
else:
|
|
67
|
+
rtnval = resp.json()
|
|
68
|
+
return rtnval
|
|
69
|
+
|
|
70
|
+
def check_token(self, client_id: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Authorization:
|
|
71
|
+
"""
|
|
72
|
+
Check a token
|
|
73
|
+
|
|
74
|
+
OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return `404 NOT FOUND`.
|
|
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 = "/applications/{client_id}/token"
|
|
85
|
+
path_params = {
|
|
86
|
+
'client_id': client_id,
|
|
87
|
+
}
|
|
88
|
+
call_leaf = leaf_template.format(**path_params)
|
|
89
|
+
|
|
90
|
+
query_params = None
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
if exp_status is None:
|
|
94
|
+
exp_status = [200]
|
|
95
|
+
|
|
96
|
+
resp = client.perform_call(
|
|
97
|
+
leaf=call_leaf,
|
|
98
|
+
method="POST",
|
|
99
|
+
params=query_params if query_params else None,
|
|
100
|
+
body=body,
|
|
101
|
+
exp_status=exp_status,
|
|
102
|
+
headers=header_params if header_params else None,
|
|
103
|
+
context_msg=None,
|
|
104
|
+
aspects=aspects,
|
|
105
|
+
)
|
|
106
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
107
|
+
rtnobj = None
|
|
108
|
+
else:
|
|
109
|
+
raw_data = resp.json()
|
|
110
|
+
rtnobj = Authorization.from_dict(raw_data)
|
|
111
|
+
return rtnobj
|
|
112
|
+
|
|
113
|
+
def create_from_manifest(self, code: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
114
|
+
"""
|
|
115
|
+
Create a GitHub App from a manifest
|
|
116
|
+
|
|
117
|
+
Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`.
|
|
118
|
+
"""
|
|
119
|
+
client = self.client
|
|
120
|
+
if aspects is None:
|
|
121
|
+
aspects = client.aspects
|
|
122
|
+
|
|
123
|
+
header_params = client.headers
|
|
124
|
+
if headers is not None:
|
|
125
|
+
header_params = headers
|
|
126
|
+
|
|
127
|
+
leaf_template = "/app-manifests/{code}/conversions"
|
|
128
|
+
path_params = {
|
|
129
|
+
'code': code,
|
|
130
|
+
}
|
|
131
|
+
call_leaf = leaf_template.format(**path_params)
|
|
132
|
+
|
|
133
|
+
query_params = None
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
if exp_status is None:
|
|
137
|
+
exp_status = [201]
|
|
138
|
+
|
|
139
|
+
resp = client.perform_call(
|
|
140
|
+
leaf=call_leaf,
|
|
141
|
+
method="POST",
|
|
142
|
+
params=query_params if query_params else None,
|
|
143
|
+
body=None,
|
|
144
|
+
exp_status=exp_status,
|
|
145
|
+
headers=header_params if header_params else None,
|
|
146
|
+
context_msg=None,
|
|
147
|
+
aspects=aspects,
|
|
148
|
+
)
|
|
149
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
150
|
+
rtnval = None
|
|
151
|
+
else:
|
|
152
|
+
rtnval = resp.json()
|
|
153
|
+
return rtnval
|
|
154
|
+
|
|
155
|
+
def create_installation_access_token(self, installation_id: int, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
156
|
+
"""
|
|
157
|
+
Create an installation access token for an app
|
|
158
|
+
|
|
159
|
+
Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.
|
|
160
|
+
|
|
161
|
+
Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.
|
|
162
|
+
|
|
163
|
+
Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.
|
|
164
|
+
|
|
165
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
166
|
+
"""
|
|
167
|
+
client = self.client
|
|
168
|
+
if aspects is None:
|
|
169
|
+
aspects = client.aspects
|
|
170
|
+
|
|
171
|
+
header_params = client.headers
|
|
172
|
+
if headers is not None:
|
|
173
|
+
header_params = headers
|
|
174
|
+
|
|
175
|
+
leaf_template = "/app/installations/{installation_id}/access_tokens"
|
|
176
|
+
path_params = {
|
|
177
|
+
'installation_id': installation_id,
|
|
178
|
+
}
|
|
179
|
+
call_leaf = leaf_template.format(**path_params)
|
|
180
|
+
|
|
181
|
+
query_params = None
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
if exp_status is None:
|
|
185
|
+
exp_status = [201]
|
|
186
|
+
|
|
187
|
+
resp = client.perform_call(
|
|
188
|
+
leaf=call_leaf,
|
|
189
|
+
method="POST",
|
|
190
|
+
params=query_params if query_params else None,
|
|
191
|
+
body=body,
|
|
192
|
+
exp_status=exp_status,
|
|
193
|
+
headers=header_params if header_params else None,
|
|
194
|
+
context_msg=None,
|
|
195
|
+
aspects=aspects,
|
|
196
|
+
)
|
|
197
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
198
|
+
rtnval = None
|
|
199
|
+
else:
|
|
200
|
+
rtnval = resp.json()
|
|
201
|
+
return rtnval
|
|
202
|
+
|
|
203
|
+
def delete_authorization(self, client_id: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
204
|
+
"""
|
|
205
|
+
Delete an app authorization
|
|
206
|
+
|
|
207
|
+
OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.
|
|
208
|
+
Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).
|
|
209
|
+
"""
|
|
210
|
+
client = self.client
|
|
211
|
+
if aspects is None:
|
|
212
|
+
aspects = client.aspects
|
|
213
|
+
|
|
214
|
+
header_params = client.headers
|
|
215
|
+
if headers is not None:
|
|
216
|
+
header_params = headers
|
|
217
|
+
|
|
218
|
+
leaf_template = "/applications/{client_id}/grant"
|
|
219
|
+
path_params = {
|
|
220
|
+
'client_id': client_id,
|
|
221
|
+
}
|
|
222
|
+
call_leaf = leaf_template.format(**path_params)
|
|
223
|
+
|
|
224
|
+
query_params = None
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
if exp_status is None:
|
|
228
|
+
exp_status = [204]
|
|
229
|
+
|
|
230
|
+
resp = client.perform_call(
|
|
231
|
+
leaf=call_leaf,
|
|
232
|
+
method="DELETE",
|
|
233
|
+
params=query_params if query_params else None,
|
|
234
|
+
body=body,
|
|
235
|
+
exp_status=exp_status,
|
|
236
|
+
headers=header_params if header_params else None,
|
|
237
|
+
context_msg=None,
|
|
238
|
+
aspects=aspects,
|
|
239
|
+
)
|
|
240
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
241
|
+
rtnval = None
|
|
242
|
+
else:
|
|
243
|
+
rtnval = resp.json()
|
|
244
|
+
return rtnval
|
|
245
|
+
|
|
246
|
+
def delete_installation(self, installation_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
247
|
+
"""
|
|
248
|
+
Delete an installation for the authenticated app
|
|
249
|
+
|
|
250
|
+
Uninstalls a GitHub App on a user, organization, or enterprise account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/apps/apps#suspend-an-app-installation)" endpoint.
|
|
251
|
+
|
|
252
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
253
|
+
"""
|
|
254
|
+
client = self.client
|
|
255
|
+
if aspects is None:
|
|
256
|
+
aspects = client.aspects
|
|
257
|
+
|
|
258
|
+
header_params = client.headers
|
|
259
|
+
if headers is not None:
|
|
260
|
+
header_params = headers
|
|
261
|
+
|
|
262
|
+
leaf_template = "/app/installations/{installation_id}"
|
|
263
|
+
path_params = {
|
|
264
|
+
'installation_id': installation_id,
|
|
265
|
+
}
|
|
266
|
+
call_leaf = leaf_template.format(**path_params)
|
|
267
|
+
|
|
268
|
+
query_params = None
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
if exp_status is None:
|
|
272
|
+
exp_status = [204]
|
|
273
|
+
|
|
274
|
+
resp = client.perform_call(
|
|
275
|
+
leaf=call_leaf,
|
|
276
|
+
method="DELETE",
|
|
277
|
+
params=query_params if query_params else None,
|
|
278
|
+
body=None,
|
|
279
|
+
exp_status=exp_status,
|
|
280
|
+
headers=header_params if header_params else None,
|
|
281
|
+
context_msg=None,
|
|
282
|
+
aspects=aspects,
|
|
283
|
+
)
|
|
284
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
285
|
+
rtnval = None
|
|
286
|
+
else:
|
|
287
|
+
rtnval = resp.json()
|
|
288
|
+
return rtnval
|
|
289
|
+
|
|
290
|
+
def delete_token(self, client_id: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
291
|
+
"""
|
|
292
|
+
Delete an app token
|
|
293
|
+
|
|
294
|
+
OAuth or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization.
|
|
295
|
+
"""
|
|
296
|
+
client = self.client
|
|
297
|
+
if aspects is None:
|
|
298
|
+
aspects = client.aspects
|
|
299
|
+
|
|
300
|
+
header_params = client.headers
|
|
301
|
+
if headers is not None:
|
|
302
|
+
header_params = headers
|
|
303
|
+
|
|
304
|
+
leaf_template = "/applications/{client_id}/token"
|
|
305
|
+
path_params = {
|
|
306
|
+
'client_id': client_id,
|
|
307
|
+
}
|
|
308
|
+
call_leaf = leaf_template.format(**path_params)
|
|
309
|
+
|
|
310
|
+
query_params = None
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
if exp_status is None:
|
|
314
|
+
exp_status = [204]
|
|
315
|
+
|
|
316
|
+
resp = client.perform_call(
|
|
317
|
+
leaf=call_leaf,
|
|
318
|
+
method="DELETE",
|
|
319
|
+
params=query_params if query_params else None,
|
|
320
|
+
body=body,
|
|
321
|
+
exp_status=exp_status,
|
|
322
|
+
headers=header_params if header_params else None,
|
|
323
|
+
context_msg=None,
|
|
324
|
+
aspects=aspects,
|
|
325
|
+
)
|
|
326
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
327
|
+
rtnval = None
|
|
328
|
+
else:
|
|
329
|
+
rtnval = resp.json()
|
|
330
|
+
return rtnval
|
|
331
|
+
|
|
332
|
+
def get_authenticated(self, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Integration:
|
|
333
|
+
"""
|
|
334
|
+
Get the authenticated app
|
|
335
|
+
|
|
336
|
+
Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/apps/apps#list-installations-for-the-authenticated-app)" endpoint.
|
|
337
|
+
|
|
338
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
339
|
+
"""
|
|
340
|
+
client = self.client
|
|
341
|
+
if aspects is None:
|
|
342
|
+
aspects = client.aspects
|
|
343
|
+
|
|
344
|
+
header_params = client.headers
|
|
345
|
+
if headers is not None:
|
|
346
|
+
header_params = headers
|
|
347
|
+
|
|
348
|
+
call_leaf = "/app"
|
|
349
|
+
|
|
350
|
+
query_params = None
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
if exp_status is None:
|
|
354
|
+
exp_status = [200]
|
|
355
|
+
|
|
356
|
+
resp = client.perform_call(
|
|
357
|
+
leaf=call_leaf,
|
|
358
|
+
method="GET",
|
|
359
|
+
params=query_params if query_params else None,
|
|
360
|
+
body=None,
|
|
361
|
+
exp_status=exp_status,
|
|
362
|
+
headers=header_params if header_params else None,
|
|
363
|
+
context_msg=None,
|
|
364
|
+
aspects=aspects,
|
|
365
|
+
)
|
|
366
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
367
|
+
rtnobj = None
|
|
368
|
+
else:
|
|
369
|
+
raw_data = resp.json()
|
|
370
|
+
rtnobj = Integration.from_dict(raw_data)
|
|
371
|
+
return rtnobj
|
|
372
|
+
|
|
373
|
+
def get_by_slug(self, app_slug: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Integration:
|
|
374
|
+
"""
|
|
375
|
+
Get an app
|
|
376
|
+
|
|
377
|
+
> [!NOTE]
|
|
378
|
+
> The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`).
|
|
379
|
+
"""
|
|
380
|
+
client = self.client
|
|
381
|
+
if aspects is None:
|
|
382
|
+
aspects = client.aspects
|
|
383
|
+
|
|
384
|
+
header_params = client.headers
|
|
385
|
+
if headers is not None:
|
|
386
|
+
header_params = headers
|
|
387
|
+
|
|
388
|
+
leaf_template = "/apps/{app_slug}"
|
|
389
|
+
path_params = {
|
|
390
|
+
'app_slug': app_slug,
|
|
391
|
+
}
|
|
392
|
+
call_leaf = leaf_template.format(**path_params)
|
|
393
|
+
|
|
394
|
+
query_params = None
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
if exp_status is None:
|
|
398
|
+
exp_status = [200]
|
|
399
|
+
|
|
400
|
+
resp = client.perform_call(
|
|
401
|
+
leaf=call_leaf,
|
|
402
|
+
method="GET",
|
|
403
|
+
params=query_params if query_params else None,
|
|
404
|
+
body=None,
|
|
405
|
+
exp_status=exp_status,
|
|
406
|
+
headers=header_params if header_params else None,
|
|
407
|
+
context_msg=None,
|
|
408
|
+
aspects=aspects,
|
|
409
|
+
)
|
|
410
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
411
|
+
rtnobj = None
|
|
412
|
+
else:
|
|
413
|
+
raw_data = resp.json()
|
|
414
|
+
rtnobj = Integration.from_dict(raw_data)
|
|
415
|
+
return rtnobj
|
|
416
|
+
|
|
417
|
+
def get_installation(self, installation_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Installation:
|
|
418
|
+
"""
|
|
419
|
+
Get an installation for the authenticated app
|
|
420
|
+
|
|
421
|
+
Enables an authenticated GitHub App to find an installation's information using the installation id.
|
|
422
|
+
|
|
423
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
424
|
+
"""
|
|
425
|
+
client = self.client
|
|
426
|
+
if aspects is None:
|
|
427
|
+
aspects = client.aspects
|
|
428
|
+
|
|
429
|
+
header_params = client.headers
|
|
430
|
+
if headers is not None:
|
|
431
|
+
header_params = headers
|
|
432
|
+
|
|
433
|
+
leaf_template = "/app/installations/{installation_id}"
|
|
434
|
+
path_params = {
|
|
435
|
+
'installation_id': installation_id,
|
|
436
|
+
}
|
|
437
|
+
call_leaf = leaf_template.format(**path_params)
|
|
438
|
+
|
|
439
|
+
query_params = None
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
if exp_status is None:
|
|
443
|
+
exp_status = [200]
|
|
444
|
+
|
|
445
|
+
resp = client.perform_call(
|
|
446
|
+
leaf=call_leaf,
|
|
447
|
+
method="GET",
|
|
448
|
+
params=query_params if query_params else None,
|
|
449
|
+
body=None,
|
|
450
|
+
exp_status=exp_status,
|
|
451
|
+
headers=header_params if header_params else None,
|
|
452
|
+
context_msg=None,
|
|
453
|
+
aspects=aspects,
|
|
454
|
+
)
|
|
455
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
456
|
+
rtnobj = None
|
|
457
|
+
else:
|
|
458
|
+
raw_data = resp.json()
|
|
459
|
+
rtnobj = Installation.from_dict(raw_data)
|
|
460
|
+
return rtnobj
|
|
461
|
+
|
|
462
|
+
def get_org_installation(self, org: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Installation:
|
|
463
|
+
"""
|
|
464
|
+
Get an organization installation for the authenticated app
|
|
465
|
+
|
|
466
|
+
Enables an authenticated GitHub App to find the organization's installation information.
|
|
467
|
+
|
|
468
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
469
|
+
"""
|
|
470
|
+
client = self.client
|
|
471
|
+
if aspects is None:
|
|
472
|
+
aspects = client.aspects
|
|
473
|
+
|
|
474
|
+
header_params = client.headers
|
|
475
|
+
if headers is not None:
|
|
476
|
+
header_params = headers
|
|
477
|
+
|
|
478
|
+
leaf_template = "/orgs/{org}/installation"
|
|
479
|
+
path_params = {
|
|
480
|
+
'org': org,
|
|
481
|
+
}
|
|
482
|
+
call_leaf = leaf_template.format(**path_params)
|
|
483
|
+
|
|
484
|
+
query_params = None
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
if exp_status is None:
|
|
488
|
+
exp_status = [200]
|
|
489
|
+
|
|
490
|
+
resp = client.perform_call(
|
|
491
|
+
leaf=call_leaf,
|
|
492
|
+
method="GET",
|
|
493
|
+
params=query_params if query_params else None,
|
|
494
|
+
body=None,
|
|
495
|
+
exp_status=exp_status,
|
|
496
|
+
headers=header_params if header_params else None,
|
|
497
|
+
context_msg=None,
|
|
498
|
+
aspects=aspects,
|
|
499
|
+
)
|
|
500
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
501
|
+
rtnobj = None
|
|
502
|
+
else:
|
|
503
|
+
raw_data = resp.json()
|
|
504
|
+
rtnobj = Installation.from_dict(raw_data)
|
|
505
|
+
return rtnobj
|
|
506
|
+
|
|
507
|
+
def get_repo_installation(self, owner: str, repo: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Installation:
|
|
508
|
+
"""
|
|
509
|
+
Get a repository installation for the authenticated app
|
|
510
|
+
|
|
511
|
+
Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to.
|
|
512
|
+
|
|
513
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
514
|
+
"""
|
|
515
|
+
client = self.client
|
|
516
|
+
if aspects is None:
|
|
517
|
+
aspects = client.aspects
|
|
518
|
+
|
|
519
|
+
header_params = client.headers
|
|
520
|
+
if headers is not None:
|
|
521
|
+
header_params = headers
|
|
522
|
+
|
|
523
|
+
leaf_template = "/repos/{owner}/{repo}/installation"
|
|
524
|
+
path_params = {
|
|
525
|
+
'owner': owner,
|
|
526
|
+
'repo': repo,
|
|
527
|
+
}
|
|
528
|
+
call_leaf = leaf_template.format(**path_params)
|
|
529
|
+
|
|
530
|
+
query_params = None
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
if exp_status is None:
|
|
534
|
+
exp_status = [200]
|
|
535
|
+
|
|
536
|
+
resp = client.perform_call(
|
|
537
|
+
leaf=call_leaf,
|
|
538
|
+
method="GET",
|
|
539
|
+
params=query_params if query_params else None,
|
|
540
|
+
body=None,
|
|
541
|
+
exp_status=exp_status,
|
|
542
|
+
headers=header_params if header_params else None,
|
|
543
|
+
context_msg=None,
|
|
544
|
+
aspects=aspects,
|
|
545
|
+
)
|
|
546
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
547
|
+
rtnobj = None
|
|
548
|
+
else:
|
|
549
|
+
raw_data = resp.json()
|
|
550
|
+
rtnobj = Installation.from_dict(raw_data)
|
|
551
|
+
return rtnobj
|
|
552
|
+
|
|
553
|
+
def get_subscription_plan_for_account(self, account_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> MarketplacePurchase:
|
|
554
|
+
"""
|
|
555
|
+
Get a subscription plan for an account
|
|
556
|
+
|
|
557
|
+
Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
|
|
558
|
+
|
|
559
|
+
GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint.
|
|
560
|
+
"""
|
|
561
|
+
client = self.client
|
|
562
|
+
if aspects is None:
|
|
563
|
+
aspects = client.aspects
|
|
564
|
+
|
|
565
|
+
header_params = client.headers
|
|
566
|
+
if headers is not None:
|
|
567
|
+
header_params = headers
|
|
568
|
+
|
|
569
|
+
leaf_template = "/marketplace_listing/accounts/{account_id}"
|
|
570
|
+
path_params = {
|
|
571
|
+
'account_id': account_id,
|
|
572
|
+
}
|
|
573
|
+
call_leaf = leaf_template.format(**path_params)
|
|
574
|
+
|
|
575
|
+
query_params = None
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
if exp_status is None:
|
|
579
|
+
exp_status = [200]
|
|
580
|
+
|
|
581
|
+
resp = client.perform_call(
|
|
582
|
+
leaf=call_leaf,
|
|
583
|
+
method="GET",
|
|
584
|
+
params=query_params if query_params else None,
|
|
585
|
+
body=None,
|
|
586
|
+
exp_status=exp_status,
|
|
587
|
+
headers=header_params if header_params else None,
|
|
588
|
+
context_msg=None,
|
|
589
|
+
aspects=aspects,
|
|
590
|
+
)
|
|
591
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
592
|
+
rtnobj = None
|
|
593
|
+
else:
|
|
594
|
+
raw_data = resp.json()
|
|
595
|
+
rtnobj = MarketplacePurchase.from_dict(raw_data)
|
|
596
|
+
return rtnobj
|
|
597
|
+
|
|
598
|
+
def get_subscription_plan_for_account_stubbed(self, account_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> MarketplacePurchase:
|
|
599
|
+
"""
|
|
600
|
+
Get a subscription plan for an account (stubbed)
|
|
601
|
+
|
|
602
|
+
Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
|
|
603
|
+
|
|
604
|
+
GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint.
|
|
605
|
+
"""
|
|
606
|
+
client = self.client
|
|
607
|
+
if aspects is None:
|
|
608
|
+
aspects = client.aspects
|
|
609
|
+
|
|
610
|
+
header_params = client.headers
|
|
611
|
+
if headers is not None:
|
|
612
|
+
header_params = headers
|
|
613
|
+
|
|
614
|
+
leaf_template = "/marketplace_listing/stubbed/accounts/{account_id}"
|
|
615
|
+
path_params = {
|
|
616
|
+
'account_id': account_id,
|
|
617
|
+
}
|
|
618
|
+
call_leaf = leaf_template.format(**path_params)
|
|
619
|
+
|
|
620
|
+
query_params = None
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
if exp_status is None:
|
|
624
|
+
exp_status = [200]
|
|
625
|
+
|
|
626
|
+
resp = client.perform_call(
|
|
627
|
+
leaf=call_leaf,
|
|
628
|
+
method="GET",
|
|
629
|
+
params=query_params if query_params else None,
|
|
630
|
+
body=None,
|
|
631
|
+
exp_status=exp_status,
|
|
632
|
+
headers=header_params if header_params else None,
|
|
633
|
+
context_msg=None,
|
|
634
|
+
aspects=aspects,
|
|
635
|
+
)
|
|
636
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
637
|
+
rtnobj = None
|
|
638
|
+
else:
|
|
639
|
+
raw_data = resp.json()
|
|
640
|
+
rtnobj = MarketplacePurchase.from_dict(raw_data)
|
|
641
|
+
return rtnobj
|
|
642
|
+
|
|
643
|
+
def get_user_installation(self, username: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Installation:
|
|
644
|
+
"""
|
|
645
|
+
Get a user installation for the authenticated app
|
|
646
|
+
|
|
647
|
+
Enables an authenticated GitHub App to find the user’s installation information.
|
|
648
|
+
|
|
649
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
650
|
+
"""
|
|
651
|
+
client = self.client
|
|
652
|
+
if aspects is None:
|
|
653
|
+
aspects = client.aspects
|
|
654
|
+
|
|
655
|
+
header_params = client.headers
|
|
656
|
+
if headers is not None:
|
|
657
|
+
header_params = headers
|
|
658
|
+
|
|
659
|
+
leaf_template = "/users/{username}/installation"
|
|
660
|
+
path_params = {
|
|
661
|
+
'username': username,
|
|
662
|
+
}
|
|
663
|
+
call_leaf = leaf_template.format(**path_params)
|
|
664
|
+
|
|
665
|
+
query_params = None
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
if exp_status is None:
|
|
669
|
+
exp_status = [200]
|
|
670
|
+
|
|
671
|
+
resp = client.perform_call(
|
|
672
|
+
leaf=call_leaf,
|
|
673
|
+
method="GET",
|
|
674
|
+
params=query_params if query_params else None,
|
|
675
|
+
body=None,
|
|
676
|
+
exp_status=exp_status,
|
|
677
|
+
headers=header_params if header_params else None,
|
|
678
|
+
context_msg=None,
|
|
679
|
+
aspects=aspects,
|
|
680
|
+
)
|
|
681
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
682
|
+
rtnobj = None
|
|
683
|
+
else:
|
|
684
|
+
raw_data = resp.json()
|
|
685
|
+
rtnobj = Installation.from_dict(raw_data)
|
|
686
|
+
return rtnobj
|
|
687
|
+
|
|
688
|
+
def get_webhook_config_for_app(self, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> WebhookConfig:
|
|
689
|
+
"""
|
|
690
|
+
Get a webhook configuration for an app
|
|
691
|
+
|
|
692
|
+
Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."
|
|
693
|
+
|
|
694
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
695
|
+
"""
|
|
696
|
+
client = self.client
|
|
697
|
+
if aspects is None:
|
|
698
|
+
aspects = client.aspects
|
|
699
|
+
|
|
700
|
+
header_params = client.headers
|
|
701
|
+
if headers is not None:
|
|
702
|
+
header_params = headers
|
|
703
|
+
|
|
704
|
+
call_leaf = "/app/hook/config"
|
|
705
|
+
|
|
706
|
+
query_params = None
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
if exp_status is None:
|
|
710
|
+
exp_status = [200]
|
|
711
|
+
|
|
712
|
+
resp = client.perform_call(
|
|
713
|
+
leaf=call_leaf,
|
|
714
|
+
method="GET",
|
|
715
|
+
params=query_params if query_params else None,
|
|
716
|
+
body=None,
|
|
717
|
+
exp_status=exp_status,
|
|
718
|
+
headers=header_params if header_params else None,
|
|
719
|
+
context_msg=None,
|
|
720
|
+
aspects=aspects,
|
|
721
|
+
)
|
|
722
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
723
|
+
rtnobj = None
|
|
724
|
+
else:
|
|
725
|
+
raw_data = resp.json()
|
|
726
|
+
rtnobj = WebhookConfig.from_dict(raw_data)
|
|
727
|
+
return rtnobj
|
|
728
|
+
|
|
729
|
+
def get_webhook_delivery(self, delivery_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> HookDelivery:
|
|
730
|
+
"""
|
|
731
|
+
Get a delivery for an app webhook
|
|
732
|
+
|
|
733
|
+
Returns a delivery for the webhook configured for a GitHub App.
|
|
734
|
+
|
|
735
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
736
|
+
"""
|
|
737
|
+
client = self.client
|
|
738
|
+
if aspects is None:
|
|
739
|
+
aspects = client.aspects
|
|
740
|
+
|
|
741
|
+
header_params = client.headers
|
|
742
|
+
if headers is not None:
|
|
743
|
+
header_params = headers
|
|
744
|
+
|
|
745
|
+
leaf_template = "/app/hook/deliveries/{delivery_id}"
|
|
746
|
+
path_params = {
|
|
747
|
+
'delivery_id': delivery_id,
|
|
748
|
+
}
|
|
749
|
+
call_leaf = leaf_template.format(**path_params)
|
|
750
|
+
|
|
751
|
+
query_params = None
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
if exp_status is None:
|
|
755
|
+
exp_status = [200]
|
|
756
|
+
|
|
757
|
+
resp = client.perform_call(
|
|
758
|
+
leaf=call_leaf,
|
|
759
|
+
method="GET",
|
|
760
|
+
params=query_params if query_params else None,
|
|
761
|
+
body=None,
|
|
762
|
+
exp_status=exp_status,
|
|
763
|
+
headers=header_params if header_params else None,
|
|
764
|
+
context_msg=None,
|
|
765
|
+
aspects=aspects,
|
|
766
|
+
)
|
|
767
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
768
|
+
rtnobj = None
|
|
769
|
+
else:
|
|
770
|
+
raw_data = resp.json()
|
|
771
|
+
rtnobj = HookDelivery.from_dict(raw_data)
|
|
772
|
+
return rtnobj
|
|
773
|
+
|
|
774
|
+
def list_accounts_for_plan(self, plan_id: int, *, sort: Optional[str] = "created", direction: Optional[str] = None, 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) -> PagedList[MarketplacePurchase]:
|
|
775
|
+
"""
|
|
776
|
+
List accounts for a plan
|
|
777
|
+
|
|
778
|
+
Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
|
|
779
|
+
|
|
780
|
+
GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint.
|
|
781
|
+
"""
|
|
782
|
+
client = self.client
|
|
783
|
+
if aspects is None:
|
|
784
|
+
aspects = client.aspects
|
|
785
|
+
|
|
786
|
+
header_params = client.headers
|
|
787
|
+
if headers is not None:
|
|
788
|
+
header_params = headers
|
|
789
|
+
|
|
790
|
+
leaf_template = "/marketplace_listing/plans/{plan_id}/accounts"
|
|
791
|
+
path_params = {
|
|
792
|
+
'plan_id': plan_id,
|
|
793
|
+
}
|
|
794
|
+
call_leaf = leaf_template.format(**path_params)
|
|
795
|
+
|
|
796
|
+
query_params = {}
|
|
797
|
+
if sort is not None:
|
|
798
|
+
query_params['sort'] = sort
|
|
799
|
+
if direction is not None:
|
|
800
|
+
query_params['direction'] = direction
|
|
801
|
+
if per_page is not None:
|
|
802
|
+
query_params['per_page'] = per_page
|
|
803
|
+
if page is not None:
|
|
804
|
+
query_params['page'] = page
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
if exp_status is None:
|
|
808
|
+
exp_status = [200]
|
|
809
|
+
|
|
810
|
+
resp = client.perform_call(
|
|
811
|
+
leaf=call_leaf,
|
|
812
|
+
method="GET",
|
|
813
|
+
params=query_params if query_params else None,
|
|
814
|
+
body=None,
|
|
815
|
+
exp_status=exp_status,
|
|
816
|
+
headers=header_params if header_params else None,
|
|
817
|
+
context_msg=None,
|
|
818
|
+
aspects=aspects,
|
|
819
|
+
)
|
|
820
|
+
raw_data = resp.json()
|
|
821
|
+
items = [self._parse_item(item, MarketplacePurchase) for item in raw_data]
|
|
822
|
+
rtnval = PagedList[MarketplacePurchase](items, dict(resp.headers), raw_data)
|
|
823
|
+
return rtnval
|
|
824
|
+
|
|
825
|
+
def list_accounts_for_plan_stubbed(self, plan_id: int, *, sort: Optional[str] = "created", direction: Optional[str] = None, 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) -> PagedList[MarketplacePurchase]:
|
|
826
|
+
"""
|
|
827
|
+
List accounts for a plan (stubbed)
|
|
828
|
+
|
|
829
|
+
Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
|
|
830
|
+
|
|
831
|
+
GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint.
|
|
832
|
+
"""
|
|
833
|
+
client = self.client
|
|
834
|
+
if aspects is None:
|
|
835
|
+
aspects = client.aspects
|
|
836
|
+
|
|
837
|
+
header_params = client.headers
|
|
838
|
+
if headers is not None:
|
|
839
|
+
header_params = headers
|
|
840
|
+
|
|
841
|
+
leaf_template = "/marketplace_listing/stubbed/plans/{plan_id}/accounts"
|
|
842
|
+
path_params = {
|
|
843
|
+
'plan_id': plan_id,
|
|
844
|
+
}
|
|
845
|
+
call_leaf = leaf_template.format(**path_params)
|
|
846
|
+
|
|
847
|
+
query_params = {}
|
|
848
|
+
if sort is not None:
|
|
849
|
+
query_params['sort'] = sort
|
|
850
|
+
if direction is not None:
|
|
851
|
+
query_params['direction'] = direction
|
|
852
|
+
if per_page is not None:
|
|
853
|
+
query_params['per_page'] = per_page
|
|
854
|
+
if page is not None:
|
|
855
|
+
query_params['page'] = page
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
if exp_status is None:
|
|
859
|
+
exp_status = [200]
|
|
860
|
+
|
|
861
|
+
resp = client.perform_call(
|
|
862
|
+
leaf=call_leaf,
|
|
863
|
+
method="GET",
|
|
864
|
+
params=query_params if query_params else None,
|
|
865
|
+
body=None,
|
|
866
|
+
exp_status=exp_status,
|
|
867
|
+
headers=header_params if header_params else None,
|
|
868
|
+
context_msg=None,
|
|
869
|
+
aspects=aspects,
|
|
870
|
+
)
|
|
871
|
+
raw_data = resp.json()
|
|
872
|
+
items = [self._parse_item(item, MarketplacePurchase) for item in raw_data]
|
|
873
|
+
rtnval = PagedList[MarketplacePurchase](items, dict(resp.headers), raw_data)
|
|
874
|
+
return rtnval
|
|
875
|
+
|
|
876
|
+
def list_installation_repos_for_authenticated_user(self, installation_id: int, *, 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]:
|
|
877
|
+
"""
|
|
878
|
+
List repositories accessible to the user access token
|
|
879
|
+
|
|
880
|
+
List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation.
|
|
881
|
+
|
|
882
|
+
The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
|
|
883
|
+
|
|
884
|
+
The access the user has to each repository is included in the hash under the `permissions` key.
|
|
885
|
+
"""
|
|
886
|
+
client = self.client
|
|
887
|
+
if aspects is None:
|
|
888
|
+
aspects = client.aspects
|
|
889
|
+
|
|
890
|
+
header_params = client.headers
|
|
891
|
+
if headers is not None:
|
|
892
|
+
header_params = headers
|
|
893
|
+
|
|
894
|
+
leaf_template = "/user/installations/{installation_id}/repositories"
|
|
895
|
+
path_params = {
|
|
896
|
+
'installation_id': installation_id,
|
|
897
|
+
}
|
|
898
|
+
call_leaf = leaf_template.format(**path_params)
|
|
899
|
+
|
|
900
|
+
query_params = {}
|
|
901
|
+
if per_page is not None:
|
|
902
|
+
query_params['per_page'] = per_page
|
|
903
|
+
if page is not None:
|
|
904
|
+
query_params['page'] = page
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
if exp_status is None:
|
|
908
|
+
exp_status = [200]
|
|
909
|
+
|
|
910
|
+
resp = client.perform_call(
|
|
911
|
+
leaf=call_leaf,
|
|
912
|
+
method="GET",
|
|
913
|
+
params=query_params if query_params else None,
|
|
914
|
+
body=None,
|
|
915
|
+
exp_status=exp_status,
|
|
916
|
+
headers=header_params if header_params else None,
|
|
917
|
+
context_msg=None,
|
|
918
|
+
aspects=aspects,
|
|
919
|
+
)
|
|
920
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
921
|
+
rtnval = None
|
|
922
|
+
else:
|
|
923
|
+
raw_data = resp.json()
|
|
924
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
925
|
+
return rtnval
|
|
926
|
+
|
|
927
|
+
def list_installation_requests_for_authenticated_app(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) -> PagedList[IntegrationInstallationRequest]:
|
|
928
|
+
"""
|
|
929
|
+
List installation requests for the authenticated app
|
|
930
|
+
|
|
931
|
+
Lists all the pending installation requests for the authenticated GitHub App.
|
|
932
|
+
"""
|
|
933
|
+
client = self.client
|
|
934
|
+
if aspects is None:
|
|
935
|
+
aspects = client.aspects
|
|
936
|
+
|
|
937
|
+
header_params = client.headers
|
|
938
|
+
if headers is not None:
|
|
939
|
+
header_params = headers
|
|
940
|
+
|
|
941
|
+
call_leaf = "/app/installation-requests"
|
|
942
|
+
|
|
943
|
+
query_params = {}
|
|
944
|
+
if per_page is not None:
|
|
945
|
+
query_params['per_page'] = per_page
|
|
946
|
+
if page is not None:
|
|
947
|
+
query_params['page'] = page
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
if exp_status is None:
|
|
951
|
+
exp_status = [200]
|
|
952
|
+
|
|
953
|
+
resp = client.perform_call(
|
|
954
|
+
leaf=call_leaf,
|
|
955
|
+
method="GET",
|
|
956
|
+
params=query_params if query_params else None,
|
|
957
|
+
body=None,
|
|
958
|
+
exp_status=exp_status,
|
|
959
|
+
headers=header_params if header_params else None,
|
|
960
|
+
context_msg=None,
|
|
961
|
+
aspects=aspects,
|
|
962
|
+
)
|
|
963
|
+
raw_data = resp.json()
|
|
964
|
+
items = [self._parse_item(item, IntegrationInstallationRequest) for item in raw_data]
|
|
965
|
+
rtnval = PagedList[IntegrationInstallationRequest](items, dict(resp.headers), raw_data)
|
|
966
|
+
return rtnval
|
|
967
|
+
|
|
968
|
+
def list_installations(self, *, per_page: Optional[int] = 30, page: Optional[int] = 1, since: Optional[str] = None, outdated: Optional[str] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[Installation]:
|
|
969
|
+
"""
|
|
970
|
+
List installations for the authenticated app
|
|
971
|
+
|
|
972
|
+
The permissions the installation has are included under the `permissions` key.
|
|
973
|
+
|
|
974
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
975
|
+
"""
|
|
976
|
+
client = self.client
|
|
977
|
+
if aspects is None:
|
|
978
|
+
aspects = client.aspects
|
|
979
|
+
|
|
980
|
+
header_params = client.headers
|
|
981
|
+
if headers is not None:
|
|
982
|
+
header_params = headers
|
|
983
|
+
|
|
984
|
+
call_leaf = "/app/installations"
|
|
985
|
+
|
|
986
|
+
query_params = {}
|
|
987
|
+
if per_page is not None:
|
|
988
|
+
query_params['per_page'] = per_page
|
|
989
|
+
if page is not None:
|
|
990
|
+
query_params['page'] = page
|
|
991
|
+
if since is not None:
|
|
992
|
+
query_params['since'] = since
|
|
993
|
+
if outdated is not None:
|
|
994
|
+
query_params['outdated'] = outdated
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
if exp_status is None:
|
|
998
|
+
exp_status = [200]
|
|
999
|
+
|
|
1000
|
+
resp = client.perform_call(
|
|
1001
|
+
leaf=call_leaf,
|
|
1002
|
+
method="GET",
|
|
1003
|
+
params=query_params if query_params else None,
|
|
1004
|
+
body=None,
|
|
1005
|
+
exp_status=exp_status,
|
|
1006
|
+
headers=header_params if header_params else None,
|
|
1007
|
+
context_msg=None,
|
|
1008
|
+
aspects=aspects,
|
|
1009
|
+
)
|
|
1010
|
+
raw_data = resp.json()
|
|
1011
|
+
items = [self._parse_item(item, Installation) for item in raw_data]
|
|
1012
|
+
rtnval = PagedList[Installation](items, dict(resp.headers), raw_data)
|
|
1013
|
+
return rtnval
|
|
1014
|
+
|
|
1015
|
+
def list_installations_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]:
|
|
1016
|
+
"""
|
|
1017
|
+
List app installations accessible to the user access token
|
|
1018
|
+
|
|
1019
|
+
Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.
|
|
1020
|
+
|
|
1021
|
+
The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
|
|
1022
|
+
|
|
1023
|
+
You can find the permissions for the installation under the `permissions` key.
|
|
1024
|
+
"""
|
|
1025
|
+
client = self.client
|
|
1026
|
+
if aspects is None:
|
|
1027
|
+
aspects = client.aspects
|
|
1028
|
+
|
|
1029
|
+
header_params = client.headers
|
|
1030
|
+
if headers is not None:
|
|
1031
|
+
header_params = headers
|
|
1032
|
+
|
|
1033
|
+
call_leaf = "/user/installations"
|
|
1034
|
+
|
|
1035
|
+
query_params = {}
|
|
1036
|
+
if per_page is not None:
|
|
1037
|
+
query_params['per_page'] = per_page
|
|
1038
|
+
if page is not None:
|
|
1039
|
+
query_params['page'] = page
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
if exp_status is None:
|
|
1043
|
+
exp_status = [200]
|
|
1044
|
+
|
|
1045
|
+
resp = client.perform_call(
|
|
1046
|
+
leaf=call_leaf,
|
|
1047
|
+
method="GET",
|
|
1048
|
+
params=query_params if query_params else None,
|
|
1049
|
+
body=None,
|
|
1050
|
+
exp_status=exp_status,
|
|
1051
|
+
headers=header_params if header_params else None,
|
|
1052
|
+
context_msg=None,
|
|
1053
|
+
aspects=aspects,
|
|
1054
|
+
)
|
|
1055
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1056
|
+
rtnval = None
|
|
1057
|
+
else:
|
|
1058
|
+
raw_data = resp.json()
|
|
1059
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1060
|
+
return rtnval
|
|
1061
|
+
|
|
1062
|
+
def list_plans(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) -> PagedList[MarketplaceListingPlan]:
|
|
1063
|
+
"""
|
|
1064
|
+
List plans
|
|
1065
|
+
|
|
1066
|
+
Lists all plans that are part of your GitHub Marketplace listing.
|
|
1067
|
+
|
|
1068
|
+
GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint.
|
|
1069
|
+
"""
|
|
1070
|
+
client = self.client
|
|
1071
|
+
if aspects is None:
|
|
1072
|
+
aspects = client.aspects
|
|
1073
|
+
|
|
1074
|
+
header_params = client.headers
|
|
1075
|
+
if headers is not None:
|
|
1076
|
+
header_params = headers
|
|
1077
|
+
|
|
1078
|
+
call_leaf = "/marketplace_listing/plans"
|
|
1079
|
+
|
|
1080
|
+
query_params = {}
|
|
1081
|
+
if per_page is not None:
|
|
1082
|
+
query_params['per_page'] = per_page
|
|
1083
|
+
if page is not None:
|
|
1084
|
+
query_params['page'] = page
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
if exp_status is None:
|
|
1088
|
+
exp_status = [200]
|
|
1089
|
+
|
|
1090
|
+
resp = client.perform_call(
|
|
1091
|
+
leaf=call_leaf,
|
|
1092
|
+
method="GET",
|
|
1093
|
+
params=query_params if query_params else None,
|
|
1094
|
+
body=None,
|
|
1095
|
+
exp_status=exp_status,
|
|
1096
|
+
headers=header_params if header_params else None,
|
|
1097
|
+
context_msg=None,
|
|
1098
|
+
aspects=aspects,
|
|
1099
|
+
)
|
|
1100
|
+
raw_data = resp.json()
|
|
1101
|
+
items = [self._parse_item(item, MarketplaceListingPlan) for item in raw_data]
|
|
1102
|
+
rtnval = PagedList[MarketplaceListingPlan](items, dict(resp.headers), raw_data)
|
|
1103
|
+
return rtnval
|
|
1104
|
+
|
|
1105
|
+
def list_plans_stubbed(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) -> PagedList[MarketplaceListingPlan]:
|
|
1106
|
+
"""
|
|
1107
|
+
List plans (stubbed)
|
|
1108
|
+
|
|
1109
|
+
Lists all plans that are part of your GitHub Marketplace listing.
|
|
1110
|
+
|
|
1111
|
+
GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint.
|
|
1112
|
+
"""
|
|
1113
|
+
client = self.client
|
|
1114
|
+
if aspects is None:
|
|
1115
|
+
aspects = client.aspects
|
|
1116
|
+
|
|
1117
|
+
header_params = client.headers
|
|
1118
|
+
if headers is not None:
|
|
1119
|
+
header_params = headers
|
|
1120
|
+
|
|
1121
|
+
call_leaf = "/marketplace_listing/stubbed/plans"
|
|
1122
|
+
|
|
1123
|
+
query_params = {}
|
|
1124
|
+
if per_page is not None:
|
|
1125
|
+
query_params['per_page'] = per_page
|
|
1126
|
+
if page is not None:
|
|
1127
|
+
query_params['page'] = page
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
if exp_status is None:
|
|
1131
|
+
exp_status = [200]
|
|
1132
|
+
|
|
1133
|
+
resp = client.perform_call(
|
|
1134
|
+
leaf=call_leaf,
|
|
1135
|
+
method="GET",
|
|
1136
|
+
params=query_params if query_params else None,
|
|
1137
|
+
body=None,
|
|
1138
|
+
exp_status=exp_status,
|
|
1139
|
+
headers=header_params if header_params else None,
|
|
1140
|
+
context_msg=None,
|
|
1141
|
+
aspects=aspects,
|
|
1142
|
+
)
|
|
1143
|
+
raw_data = resp.json()
|
|
1144
|
+
items = [self._parse_item(item, MarketplaceListingPlan) for item in raw_data]
|
|
1145
|
+
rtnval = PagedList[MarketplaceListingPlan](items, dict(resp.headers), raw_data)
|
|
1146
|
+
return rtnval
|
|
1147
|
+
|
|
1148
|
+
def list_repos_accessible_to_installation(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]:
|
|
1149
|
+
"""
|
|
1150
|
+
List repositories accessible to the app installation
|
|
1151
|
+
|
|
1152
|
+
List repositories that an app installation can access.
|
|
1153
|
+
"""
|
|
1154
|
+
client = self.client
|
|
1155
|
+
if aspects is None:
|
|
1156
|
+
aspects = client.aspects
|
|
1157
|
+
|
|
1158
|
+
header_params = client.headers
|
|
1159
|
+
if headers is not None:
|
|
1160
|
+
header_params = headers
|
|
1161
|
+
|
|
1162
|
+
call_leaf = "/installation/repositories"
|
|
1163
|
+
|
|
1164
|
+
query_params = {}
|
|
1165
|
+
if per_page is not None:
|
|
1166
|
+
query_params['per_page'] = per_page
|
|
1167
|
+
if page is not None:
|
|
1168
|
+
query_params['page'] = page
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
if exp_status is None:
|
|
1172
|
+
exp_status = [200]
|
|
1173
|
+
|
|
1174
|
+
resp = client.perform_call(
|
|
1175
|
+
leaf=call_leaf,
|
|
1176
|
+
method="GET",
|
|
1177
|
+
params=query_params if query_params else None,
|
|
1178
|
+
body=None,
|
|
1179
|
+
exp_status=exp_status,
|
|
1180
|
+
headers=header_params if header_params else None,
|
|
1181
|
+
context_msg=None,
|
|
1182
|
+
aspects=aspects,
|
|
1183
|
+
)
|
|
1184
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1185
|
+
rtnval = None
|
|
1186
|
+
else:
|
|
1187
|
+
raw_data = resp.json()
|
|
1188
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1189
|
+
return rtnval
|
|
1190
|
+
|
|
1191
|
+
def list_subscriptions_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) -> PagedList[UserMarketplacePurchase]:
|
|
1192
|
+
"""
|
|
1193
|
+
List subscriptions for the authenticated user
|
|
1194
|
+
|
|
1195
|
+
Lists the active subscriptions for the authenticated user.
|
|
1196
|
+
"""
|
|
1197
|
+
client = self.client
|
|
1198
|
+
if aspects is None:
|
|
1199
|
+
aspects = client.aspects
|
|
1200
|
+
|
|
1201
|
+
header_params = client.headers
|
|
1202
|
+
if headers is not None:
|
|
1203
|
+
header_params = headers
|
|
1204
|
+
|
|
1205
|
+
call_leaf = "/user/marketplace_purchases"
|
|
1206
|
+
|
|
1207
|
+
query_params = {}
|
|
1208
|
+
if per_page is not None:
|
|
1209
|
+
query_params['per_page'] = per_page
|
|
1210
|
+
if page is not None:
|
|
1211
|
+
query_params['page'] = page
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
if exp_status is None:
|
|
1215
|
+
exp_status = [200]
|
|
1216
|
+
|
|
1217
|
+
resp = client.perform_call(
|
|
1218
|
+
leaf=call_leaf,
|
|
1219
|
+
method="GET",
|
|
1220
|
+
params=query_params if query_params else None,
|
|
1221
|
+
body=None,
|
|
1222
|
+
exp_status=exp_status,
|
|
1223
|
+
headers=header_params if header_params else None,
|
|
1224
|
+
context_msg=None,
|
|
1225
|
+
aspects=aspects,
|
|
1226
|
+
)
|
|
1227
|
+
raw_data = resp.json()
|
|
1228
|
+
items = [self._parse_item(item, UserMarketplacePurchase) for item in raw_data]
|
|
1229
|
+
rtnval = PagedList[UserMarketplacePurchase](items, dict(resp.headers), raw_data)
|
|
1230
|
+
return rtnval
|
|
1231
|
+
|
|
1232
|
+
def list_subscriptions_for_authenticated_user_stubbed(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) -> PagedList[UserMarketplacePurchase]:
|
|
1233
|
+
"""
|
|
1234
|
+
List subscriptions for the authenticated user (stubbed)
|
|
1235
|
+
|
|
1236
|
+
Lists the active subscriptions for the authenticated user.
|
|
1237
|
+
"""
|
|
1238
|
+
client = self.client
|
|
1239
|
+
if aspects is None:
|
|
1240
|
+
aspects = client.aspects
|
|
1241
|
+
|
|
1242
|
+
header_params = client.headers
|
|
1243
|
+
if headers is not None:
|
|
1244
|
+
header_params = headers
|
|
1245
|
+
|
|
1246
|
+
call_leaf = "/user/marketplace_purchases/stubbed"
|
|
1247
|
+
|
|
1248
|
+
query_params = {}
|
|
1249
|
+
if per_page is not None:
|
|
1250
|
+
query_params['per_page'] = per_page
|
|
1251
|
+
if page is not None:
|
|
1252
|
+
query_params['page'] = page
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
if exp_status is None:
|
|
1256
|
+
exp_status = [200]
|
|
1257
|
+
|
|
1258
|
+
resp = client.perform_call(
|
|
1259
|
+
leaf=call_leaf,
|
|
1260
|
+
method="GET",
|
|
1261
|
+
params=query_params if query_params else None,
|
|
1262
|
+
body=None,
|
|
1263
|
+
exp_status=exp_status,
|
|
1264
|
+
headers=header_params if header_params else None,
|
|
1265
|
+
context_msg=None,
|
|
1266
|
+
aspects=aspects,
|
|
1267
|
+
)
|
|
1268
|
+
raw_data = resp.json()
|
|
1269
|
+
items = [self._parse_item(item, UserMarketplacePurchase) for item in raw_data]
|
|
1270
|
+
rtnval = PagedList[UserMarketplacePurchase](items, dict(resp.headers), raw_data)
|
|
1271
|
+
return rtnval
|
|
1272
|
+
|
|
1273
|
+
def list_webhook_deliveries(self, *, per_page: Optional[int] = 30, cursor: Optional[str] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[HookDeliveryItem]:
|
|
1274
|
+
"""
|
|
1275
|
+
List deliveries for an app webhook
|
|
1276
|
+
|
|
1277
|
+
Returns a list of webhook deliveries for the webhook configured for a GitHub App.
|
|
1278
|
+
|
|
1279
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
1280
|
+
"""
|
|
1281
|
+
client = self.client
|
|
1282
|
+
if aspects is None:
|
|
1283
|
+
aspects = client.aspects
|
|
1284
|
+
|
|
1285
|
+
header_params = client.headers
|
|
1286
|
+
if headers is not None:
|
|
1287
|
+
header_params = headers
|
|
1288
|
+
|
|
1289
|
+
call_leaf = "/app/hook/deliveries"
|
|
1290
|
+
|
|
1291
|
+
query_params = {}
|
|
1292
|
+
if per_page is not None:
|
|
1293
|
+
query_params['per_page'] = per_page
|
|
1294
|
+
if cursor is not None:
|
|
1295
|
+
query_params['cursor'] = cursor
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
if exp_status is None:
|
|
1299
|
+
exp_status = [200]
|
|
1300
|
+
|
|
1301
|
+
resp = client.perform_call(
|
|
1302
|
+
leaf=call_leaf,
|
|
1303
|
+
method="GET",
|
|
1304
|
+
params=query_params if query_params else None,
|
|
1305
|
+
body=None,
|
|
1306
|
+
exp_status=exp_status,
|
|
1307
|
+
headers=header_params if header_params else None,
|
|
1308
|
+
context_msg=None,
|
|
1309
|
+
aspects=aspects,
|
|
1310
|
+
)
|
|
1311
|
+
raw_data = resp.json()
|
|
1312
|
+
items = [self._parse_item(item, HookDeliveryItem) for item in raw_data]
|
|
1313
|
+
rtnval = PagedList[HookDeliveryItem](items, dict(resp.headers), raw_data)
|
|
1314
|
+
return rtnval
|
|
1315
|
+
|
|
1316
|
+
def redeliver_webhook_delivery(self, delivery_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
1317
|
+
"""
|
|
1318
|
+
Redeliver a delivery for an app webhook
|
|
1319
|
+
|
|
1320
|
+
Redeliver a delivery for the webhook configured for a GitHub App.
|
|
1321
|
+
|
|
1322
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
1323
|
+
"""
|
|
1324
|
+
client = self.client
|
|
1325
|
+
if aspects is None:
|
|
1326
|
+
aspects = client.aspects
|
|
1327
|
+
|
|
1328
|
+
header_params = client.headers
|
|
1329
|
+
if headers is not None:
|
|
1330
|
+
header_params = headers
|
|
1331
|
+
|
|
1332
|
+
leaf_template = "/app/hook/deliveries/{delivery_id}/attempts"
|
|
1333
|
+
path_params = {
|
|
1334
|
+
'delivery_id': delivery_id,
|
|
1335
|
+
}
|
|
1336
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1337
|
+
|
|
1338
|
+
query_params = None
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
if exp_status is None:
|
|
1342
|
+
exp_status = [202]
|
|
1343
|
+
|
|
1344
|
+
resp = client.perform_call(
|
|
1345
|
+
leaf=call_leaf,
|
|
1346
|
+
method="POST",
|
|
1347
|
+
params=query_params if query_params else None,
|
|
1348
|
+
body=None,
|
|
1349
|
+
exp_status=exp_status,
|
|
1350
|
+
headers=header_params if header_params else None,
|
|
1351
|
+
context_msg=None,
|
|
1352
|
+
aspects=aspects,
|
|
1353
|
+
)
|
|
1354
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1355
|
+
rtnval = None
|
|
1356
|
+
else:
|
|
1357
|
+
rtnval = resp.json()
|
|
1358
|
+
return rtnval
|
|
1359
|
+
|
|
1360
|
+
def remove_repo_from_installation_for_authenticated_user(self, installation_id: int, repository_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
1361
|
+
"""
|
|
1362
|
+
Remove a repository from an app installation
|
|
1363
|
+
|
|
1364
|
+
Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`.
|
|
1365
|
+
|
|
1366
|
+
This endpoint only works for PATs (classic) with the `repo` scope.
|
|
1367
|
+
"""
|
|
1368
|
+
client = self.client
|
|
1369
|
+
if aspects is None:
|
|
1370
|
+
aspects = client.aspects
|
|
1371
|
+
|
|
1372
|
+
header_params = client.headers
|
|
1373
|
+
if headers is not None:
|
|
1374
|
+
header_params = headers
|
|
1375
|
+
|
|
1376
|
+
leaf_template = "/user/installations/{installation_id}/repositories/{repository_id}"
|
|
1377
|
+
path_params = {
|
|
1378
|
+
'installation_id': installation_id,
|
|
1379
|
+
'repository_id': repository_id,
|
|
1380
|
+
}
|
|
1381
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1382
|
+
|
|
1383
|
+
query_params = None
|
|
1384
|
+
|
|
1385
|
+
|
|
1386
|
+
if exp_status is None:
|
|
1387
|
+
exp_status = [204]
|
|
1388
|
+
|
|
1389
|
+
resp = client.perform_call(
|
|
1390
|
+
leaf=call_leaf,
|
|
1391
|
+
method="DELETE",
|
|
1392
|
+
params=query_params if query_params else None,
|
|
1393
|
+
body=None,
|
|
1394
|
+
exp_status=exp_status,
|
|
1395
|
+
headers=header_params if header_params else None,
|
|
1396
|
+
context_msg=None,
|
|
1397
|
+
aspects=aspects,
|
|
1398
|
+
)
|
|
1399
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1400
|
+
rtnval = None
|
|
1401
|
+
else:
|
|
1402
|
+
rtnval = resp.json()
|
|
1403
|
+
return rtnval
|
|
1404
|
+
|
|
1405
|
+
def reset_token(self, client_id: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Authorization:
|
|
1406
|
+
"""
|
|
1407
|
+
Reset a token
|
|
1408
|
+
|
|
1409
|
+
OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return `404 NOT FOUND`.
|
|
1410
|
+
"""
|
|
1411
|
+
client = self.client
|
|
1412
|
+
if aspects is None:
|
|
1413
|
+
aspects = client.aspects
|
|
1414
|
+
|
|
1415
|
+
header_params = client.headers
|
|
1416
|
+
if headers is not None:
|
|
1417
|
+
header_params = headers
|
|
1418
|
+
|
|
1419
|
+
leaf_template = "/applications/{client_id}/token"
|
|
1420
|
+
path_params = {
|
|
1421
|
+
'client_id': client_id,
|
|
1422
|
+
}
|
|
1423
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1424
|
+
|
|
1425
|
+
query_params = None
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
if exp_status is None:
|
|
1429
|
+
exp_status = [200]
|
|
1430
|
+
|
|
1431
|
+
resp = client.perform_call(
|
|
1432
|
+
leaf=call_leaf,
|
|
1433
|
+
method="PATCH",
|
|
1434
|
+
params=query_params if query_params else None,
|
|
1435
|
+
body=body,
|
|
1436
|
+
exp_status=exp_status,
|
|
1437
|
+
headers=header_params if header_params else None,
|
|
1438
|
+
context_msg=None,
|
|
1439
|
+
aspects=aspects,
|
|
1440
|
+
)
|
|
1441
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1442
|
+
rtnobj = None
|
|
1443
|
+
else:
|
|
1444
|
+
raw_data = resp.json()
|
|
1445
|
+
rtnobj = Authorization.from_dict(raw_data)
|
|
1446
|
+
return rtnobj
|
|
1447
|
+
|
|
1448
|
+
def revoke_installation_access_token(self, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
1449
|
+
"""
|
|
1450
|
+
Revoke an installation access token
|
|
1451
|
+
|
|
1452
|
+
Revokes the installation token you're using to authenticate as an installation and access this endpoint.
|
|
1453
|
+
|
|
1454
|
+
Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/apps/apps#create-an-installation-access-token-for-an-app)" endpoint.
|
|
1455
|
+
"""
|
|
1456
|
+
client = self.client
|
|
1457
|
+
if aspects is None:
|
|
1458
|
+
aspects = client.aspects
|
|
1459
|
+
|
|
1460
|
+
header_params = client.headers
|
|
1461
|
+
if headers is not None:
|
|
1462
|
+
header_params = headers
|
|
1463
|
+
|
|
1464
|
+
call_leaf = "/installation/token"
|
|
1465
|
+
|
|
1466
|
+
query_params = None
|
|
1467
|
+
|
|
1468
|
+
|
|
1469
|
+
if exp_status is None:
|
|
1470
|
+
exp_status = [204]
|
|
1471
|
+
|
|
1472
|
+
resp = client.perform_call(
|
|
1473
|
+
leaf=call_leaf,
|
|
1474
|
+
method="DELETE",
|
|
1475
|
+
params=query_params if query_params else None,
|
|
1476
|
+
body=None,
|
|
1477
|
+
exp_status=exp_status,
|
|
1478
|
+
headers=header_params if header_params else None,
|
|
1479
|
+
context_msg=None,
|
|
1480
|
+
aspects=aspects,
|
|
1481
|
+
)
|
|
1482
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1483
|
+
rtnval = None
|
|
1484
|
+
else:
|
|
1485
|
+
rtnval = resp.json()
|
|
1486
|
+
return rtnval
|
|
1487
|
+
|
|
1488
|
+
def scope_token(self, client_id: str, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Authorization:
|
|
1489
|
+
"""
|
|
1490
|
+
Create a scoped access token
|
|
1491
|
+
|
|
1492
|
+
Use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specify
|
|
1493
|
+
which repositories the token can access and which permissions are granted to the
|
|
1494
|
+
token.
|
|
1495
|
+
|
|
1496
|
+
Invalid tokens will return `404 NOT FOUND`.
|
|
1497
|
+
"""
|
|
1498
|
+
client = self.client
|
|
1499
|
+
if aspects is None:
|
|
1500
|
+
aspects = client.aspects
|
|
1501
|
+
|
|
1502
|
+
header_params = client.headers
|
|
1503
|
+
if headers is not None:
|
|
1504
|
+
header_params = headers
|
|
1505
|
+
|
|
1506
|
+
leaf_template = "/applications/{client_id}/token/scoped"
|
|
1507
|
+
path_params = {
|
|
1508
|
+
'client_id': client_id,
|
|
1509
|
+
}
|
|
1510
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1511
|
+
|
|
1512
|
+
query_params = None
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
if exp_status is None:
|
|
1516
|
+
exp_status = [200]
|
|
1517
|
+
|
|
1518
|
+
resp = client.perform_call(
|
|
1519
|
+
leaf=call_leaf,
|
|
1520
|
+
method="POST",
|
|
1521
|
+
params=query_params if query_params else None,
|
|
1522
|
+
body=body,
|
|
1523
|
+
exp_status=exp_status,
|
|
1524
|
+
headers=header_params if header_params else None,
|
|
1525
|
+
context_msg=None,
|
|
1526
|
+
aspects=aspects,
|
|
1527
|
+
)
|
|
1528
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1529
|
+
rtnobj = None
|
|
1530
|
+
else:
|
|
1531
|
+
raw_data = resp.json()
|
|
1532
|
+
rtnobj = Authorization.from_dict(raw_data)
|
|
1533
|
+
return rtnobj
|
|
1534
|
+
|
|
1535
|
+
def suspend_installation(self, installation_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
1536
|
+
"""
|
|
1537
|
+
Suspend an app installation
|
|
1538
|
+
|
|
1539
|
+
Suspends a GitHub App on a user, organization, or enterprise account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.
|
|
1540
|
+
|
|
1541
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
1542
|
+
"""
|
|
1543
|
+
client = self.client
|
|
1544
|
+
if aspects is None:
|
|
1545
|
+
aspects = client.aspects
|
|
1546
|
+
|
|
1547
|
+
header_params = client.headers
|
|
1548
|
+
if headers is not None:
|
|
1549
|
+
header_params = headers
|
|
1550
|
+
|
|
1551
|
+
leaf_template = "/app/installations/{installation_id}/suspended"
|
|
1552
|
+
path_params = {
|
|
1553
|
+
'installation_id': installation_id,
|
|
1554
|
+
}
|
|
1555
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1556
|
+
|
|
1557
|
+
query_params = None
|
|
1558
|
+
|
|
1559
|
+
|
|
1560
|
+
if exp_status is None:
|
|
1561
|
+
exp_status = [204]
|
|
1562
|
+
|
|
1563
|
+
resp = client.perform_call(
|
|
1564
|
+
leaf=call_leaf,
|
|
1565
|
+
method="PUT",
|
|
1566
|
+
params=query_params if query_params else None,
|
|
1567
|
+
body=None,
|
|
1568
|
+
exp_status=exp_status,
|
|
1569
|
+
headers=header_params if header_params else None,
|
|
1570
|
+
context_msg=None,
|
|
1571
|
+
aspects=aspects,
|
|
1572
|
+
)
|
|
1573
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1574
|
+
rtnval = None
|
|
1575
|
+
else:
|
|
1576
|
+
rtnval = resp.json()
|
|
1577
|
+
return rtnval
|
|
1578
|
+
|
|
1579
|
+
def unsuspend_installation(self, installation_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
1580
|
+
"""
|
|
1581
|
+
Unsuspend an app installation
|
|
1582
|
+
|
|
1583
|
+
Removes a GitHub App installation suspension.
|
|
1584
|
+
|
|
1585
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
1586
|
+
"""
|
|
1587
|
+
client = self.client
|
|
1588
|
+
if aspects is None:
|
|
1589
|
+
aspects = client.aspects
|
|
1590
|
+
|
|
1591
|
+
header_params = client.headers
|
|
1592
|
+
if headers is not None:
|
|
1593
|
+
header_params = headers
|
|
1594
|
+
|
|
1595
|
+
leaf_template = "/app/installations/{installation_id}/suspended"
|
|
1596
|
+
path_params = {
|
|
1597
|
+
'installation_id': installation_id,
|
|
1598
|
+
}
|
|
1599
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1600
|
+
|
|
1601
|
+
query_params = None
|
|
1602
|
+
|
|
1603
|
+
|
|
1604
|
+
if exp_status is None:
|
|
1605
|
+
exp_status = [204]
|
|
1606
|
+
|
|
1607
|
+
resp = client.perform_call(
|
|
1608
|
+
leaf=call_leaf,
|
|
1609
|
+
method="DELETE",
|
|
1610
|
+
params=query_params if query_params else None,
|
|
1611
|
+
body=None,
|
|
1612
|
+
exp_status=exp_status,
|
|
1613
|
+
headers=header_params if header_params else None,
|
|
1614
|
+
context_msg=None,
|
|
1615
|
+
aspects=aspects,
|
|
1616
|
+
)
|
|
1617
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1618
|
+
rtnval = None
|
|
1619
|
+
else:
|
|
1620
|
+
rtnval = resp.json()
|
|
1621
|
+
return rtnval
|
|
1622
|
+
|
|
1623
|
+
def update_webhook_config_for_app(self, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> WebhookConfig:
|
|
1624
|
+
"""
|
|
1625
|
+
Update a webhook configuration for an app
|
|
1626
|
+
|
|
1627
|
+
Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."
|
|
1628
|
+
|
|
1629
|
+
You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
|
|
1630
|
+
"""
|
|
1631
|
+
client = self.client
|
|
1632
|
+
if aspects is None:
|
|
1633
|
+
aspects = client.aspects
|
|
1634
|
+
|
|
1635
|
+
header_params = client.headers
|
|
1636
|
+
if headers is not None:
|
|
1637
|
+
header_params = headers
|
|
1638
|
+
|
|
1639
|
+
call_leaf = "/app/hook/config"
|
|
1640
|
+
|
|
1641
|
+
query_params = None
|
|
1642
|
+
|
|
1643
|
+
|
|
1644
|
+
if exp_status is None:
|
|
1645
|
+
exp_status = [200]
|
|
1646
|
+
|
|
1647
|
+
resp = client.perform_call(
|
|
1648
|
+
leaf=call_leaf,
|
|
1649
|
+
method="PATCH",
|
|
1650
|
+
params=query_params if query_params else None,
|
|
1651
|
+
body=body,
|
|
1652
|
+
exp_status=exp_status,
|
|
1653
|
+
headers=header_params if header_params else None,
|
|
1654
|
+
context_msg=None,
|
|
1655
|
+
aspects=aspects,
|
|
1656
|
+
)
|
|
1657
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1658
|
+
rtnobj = None
|
|
1659
|
+
else:
|
|
1660
|
+
raw_data = resp.json()
|
|
1661
|
+
rtnobj = WebhookConfig.from_dict(raw_data)
|
|
1662
|
+
return rtnobj
|