githubkit 0.9.7__py3-none-any.whl → 0.10.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. githubkit/auth/app.py +4 -4
  2. githubkit/rest/__init__.py +4 -4
  3. githubkit/rest/actions.py +1332 -0
  4. githubkit/rest/activity.py +312 -0
  5. githubkit/rest/apps.py +372 -0
  6. githubkit/rest/billing.py +62 -0
  7. githubkit/rest/checks.py +122 -0
  8. githubkit/rest/code_scanning.py +278 -0
  9. githubkit/rest/codes_of_conduct.py +22 -0
  10. githubkit/rest/codespaces.py +472 -0
  11. githubkit/rest/dependabot.py +192 -0
  12. githubkit/rest/dependency_graph.py +22 -0
  13. githubkit/rest/emojis.py +12 -0
  14. githubkit/rest/gists.py +202 -0
  15. githubkit/rest/git.py +132 -0
  16. githubkit/rest/gitignore.py +22 -0
  17. githubkit/rest/interactions.py +92 -0
  18. githubkit/rest/issues.py +402 -0
  19. githubkit/rest/licenses.py +32 -0
  20. githubkit/rest/markdown.py +22 -0
  21. githubkit/rest/meta.py +52 -0
  22. githubkit/rest/migrations.py +222 -0
  23. githubkit/rest/models.py +557 -36
  24. githubkit/rest/oidc.py +22 -0
  25. githubkit/rest/orgs.py +1276 -12
  26. githubkit/rest/packages.py +358 -0
  27. githubkit/rest/projects.py +252 -0
  28. githubkit/rest/pulls.py +274 -0
  29. githubkit/rest/rate_limit.py +12 -0
  30. githubkit/rest/reactions.py +252 -0
  31. githubkit/rest/repos.py +1703 -1
  32. githubkit/rest/search.py +72 -0
  33. githubkit/rest/secret_scanning.py +62 -0
  34. githubkit/rest/teams.py +602 -0
  35. githubkit/rest/types.py +334 -27
  36. githubkit/rest/users.py +412 -0
  37. githubkit/utils.py +2 -0
  38. {githubkit-0.9.7.dist-info → githubkit-0.10.0.dist-info}/METADATA +1 -1
  39. githubkit-0.10.0.dist-info/RECORD +67 -0
  40. githubkit-0.9.7.dist-info/RECORD +0 -67
  41. {githubkit-0.9.7.dist-info → githubkit-0.10.0.dist-info}/LICENSE +0 -0
  42. {githubkit-0.9.7.dist-info → githubkit-0.10.0.dist-info}/WHEEL +0 -0
githubkit/auth/app.py CHANGED
@@ -33,7 +33,7 @@ class AppAuth(httpx.Auth):
33
33
  """GitHub App or Installation Authentication Hook"""
34
34
 
35
35
  github: "GitHubCore"
36
- app_id: str
36
+ app_id: Union[str, int]
37
37
  private_key: str
38
38
  client_id: Optional[str] = None
39
39
  client_secret: Optional[str] = None
@@ -59,7 +59,7 @@ class AppAuth(httpx.Auth):
59
59
  time = datetime.now(timezone.utc) - timedelta(minutes=1)
60
60
  expire_time = time + timedelta(minutes=10)
61
61
  return jwt.encode(
62
- {"iss": self.app_id, "iat": time, "exp": expire_time},
62
+ {"iss": str(self.app_id), "iat": time, "exp": expire_time},
63
63
  self.private_key,
64
64
  algorithm="RS256",
65
65
  )
@@ -219,7 +219,7 @@ class AppAuth(httpx.Auth):
219
219
  class AppAuthStrategy(BaseAuthStrategy):
220
220
  """GitHub App Authentication"""
221
221
 
222
- app_id: str
222
+ app_id: Union[str, int]
223
223
  private_key: str
224
224
  client_id: Optional[str] = None
225
225
  client_secret: Optional[str] = None
@@ -266,7 +266,7 @@ class AppAuthStrategy(BaseAuthStrategy):
266
266
  class AppInstallationAuthStrategy(BaseAuthStrategy):
267
267
  """GitHub App Installation Authentication"""
268
268
 
269
- app_id: str
269
+ app_id: Union[str, int]
270
270
  private_key: str
271
271
  installation_id: int
272
272
  client_id: Optional[str] = None
@@ -117,6 +117,10 @@ class RestNamespace:
117
117
  def codespaces(self) -> CodespacesClient:
118
118
  return CodespacesClient(self._github)
119
119
 
120
+ @cached_property
121
+ def packages(self) -> PackagesClient:
122
+ return PackagesClient(self._github)
123
+
120
124
  @cached_property
121
125
  def interactions(self) -> InteractionsClient:
122
126
  return InteractionsClient(self._github)
@@ -125,10 +129,6 @@ class RestNamespace:
125
129
  def migrations(self) -> MigrationsClient:
126
130
  return MigrationsClient(self._github)
127
131
 
128
- @cached_property
129
- def packages(self) -> PackagesClient:
130
- return PackagesClient(self._github)
131
-
132
132
  @cached_property
133
133
  def projects(self) -> ProjectsClient:
134
134
  return ProjectsClient(self._github)