From ecdae857c77483808a908959861fbf037b432d2d Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Thu, 6 Feb 2025 12:05:25 +0000 Subject: [PATCH] :bug: adding missing read to app permissions --- githubkit/versions/ghec_v2022_11_28/models/group_0017.py | 2 +- githubkit/versions/ghec_v2022_11_28/types/group_0017.py | 2 +- githubkit/versions/v2022_11_28/models/group_0017.py | 2 +- githubkit/versions/v2022_11_28/types/group_0017.py | 2 +- pyproject.toml | 6 ++++++ 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/githubkit/versions/ghec_v2022_11_28/models/group_0017.py b/githubkit/versions/ghec_v2022_11_28/models/group_0017.py index bdbe051a1..b1bd5b52b 100644 --- a/githubkit/versions/ghec_v2022_11_28/models/group_0017.py +++ b/githubkit/versions/ghec_v2022_11_28/models/group_0017.py @@ -140,7 +140,7 @@ class AppPermissions(GitHubModel): default=UNSET, description="The level of permission to grant the access token for custom property management.", ) - organization_copilot_seat_management: Missing[Literal["write"]] = Field( + organization_copilot_seat_management: Missing[Literal["write", "read"]] = Field( default=UNSET, description="The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change.", ) diff --git a/githubkit/versions/ghec_v2022_11_28/types/group_0017.py b/githubkit/versions/ghec_v2022_11_28/types/group_0017.py index 2c2b62d2f..44e3ae29a 100644 --- a/githubkit/versions/ghec_v2022_11_28/types/group_0017.py +++ b/githubkit/versions/ghec_v2022_11_28/types/group_0017.py @@ -51,7 +51,7 @@ class AppPermissionsType(TypedDict): organization_custom_roles: NotRequired[Literal["read", "write"]] organization_custom_org_roles: NotRequired[Literal["read", "write"]] organization_custom_properties: NotRequired[Literal["read", "write", "admin"]] - organization_copilot_seat_management: NotRequired[Literal["write"]] + organization_copilot_seat_management: NotRequired[Literal["write", "read"]] organization_announcement_banners: NotRequired[Literal["read", "write"]] organization_events: NotRequired[Literal["read"]] organization_hooks: NotRequired[Literal["read", "write"]] diff --git a/githubkit/versions/v2022_11_28/models/group_0017.py b/githubkit/versions/v2022_11_28/models/group_0017.py index bdbe051a1..b1bd5b52b 100644 --- a/githubkit/versions/v2022_11_28/models/group_0017.py +++ b/githubkit/versions/v2022_11_28/models/group_0017.py @@ -140,7 +140,7 @@ class AppPermissions(GitHubModel): default=UNSET, description="The level of permission to grant the access token for custom property management.", ) - organization_copilot_seat_management: Missing[Literal["write"]] = Field( + organization_copilot_seat_management: Missing[Literal["write", "read"]] = Field( default=UNSET, description="The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change.", ) diff --git a/githubkit/versions/v2022_11_28/types/group_0017.py b/githubkit/versions/v2022_11_28/types/group_0017.py index 2c2b62d2f..44e3ae29a 100644 --- a/githubkit/versions/v2022_11_28/types/group_0017.py +++ b/githubkit/versions/v2022_11_28/types/group_0017.py @@ -51,7 +51,7 @@ class AppPermissionsType(TypedDict): organization_custom_roles: NotRequired[Literal["read", "write"]] organization_custom_org_roles: NotRequired[Literal["read", "write"]] organization_custom_properties: NotRequired[Literal["read", "write", "admin"]] - organization_copilot_seat_management: NotRequired[Literal["write"]] + organization_copilot_seat_management: NotRequired[Literal["write", "read"]] organization_announcement_banners: NotRequired[Literal["read", "write"]] organization_events: NotRequired[Literal["read"]] organization_hooks: NotRequired[Literal["read", "write"]] diff --git a/pyproject.toml b/pyproject.toml index fab1f4a93..5e1c48795 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -356,6 +356,12 @@ source = "https://raw.githubusercontent.com/github/rest-api-description/main/des # { "$ref" = "#/components/schemas/organization" }, # ] } +# https://github.com/yanyongyu/githubkit/issues/189 +# app installation permissions missing "read" +"/components/schemas/app-permissions/properties/organization_copilot_seat_management/enum" = { "" = [ + "read", +] } + # date-time search syntax should be string # https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates "/components/parameters/created/schema" = { format = "" }