Skip to content

Commit

Permalink
🐛 Fix: missing read permission for app installation (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Feb 7, 2025
1 parent c62650e commit 455f760
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion githubkit/versions/ghec_v2022_11_28/models/group_0017.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
)
Expand Down
2 changes: 1 addition & 1 deletion githubkit/versions/ghec_v2022_11_28/types/group_0017.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]]
Expand Down
2 changes: 1 addition & 1 deletion githubkit/versions/v2022_11_28/models/group_0017.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
)
Expand Down
2 changes: 1 addition & 1 deletion githubkit/versions/v2022_11_28/types/group_0017.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]]
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" = { "<add>" = [
"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 = "<unset>" }
Expand Down

0 comments on commit 455f760

Please sign in to comment.