Skip to content

Commit

Permalink
👽 re-generate openapi models
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Dec 8, 2024
1 parent ce686be commit b79cd14
Show file tree
Hide file tree
Showing 4,408 changed files with 229,009 additions and 224,362 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
112 changes: 112 additions & 0 deletions githubkit/rest/__init__.py

Large diffs are not rendered by default.

8,974 changes: 4,548 additions & 4,426 deletions githubkit/versions/ghec_v2022_11_28/models/__init__.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion githubkit/versions/ghec_v2022_11_28/models/group_0057.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class CopilotSeatDetails(GitHubModel):
)
updated_at: Missing[datetime] = Field(
default=UNSET,
description="Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format.",
description="**Closing down notice:** This field is no longer relevant and is closing down. Use the `created_at` field to determine when the assignee was last granted access to GitHub Copilot. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format.",
)
plan_type: Missing[Literal["business", "enterprise", "unknown"]] = Field(
default=UNSET,
Expand Down
111 changes: 33 additions & 78 deletions githubkit/versions/ghec_v2022_11_28/models/group_0066.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,103 +9,58 @@

from __future__ import annotations

from datetime import datetime
from typing import Literal, Union
from typing import Annotated, Literal, Union

from pydantic import Field

from githubkit.compat import GitHubModel, model_rebuild
from githubkit.compat import PYDANTIC_V2, GitHubModel, model_rebuild
from githubkit.typing import Missing
from githubkit.utils import UNSET

from .group_0002 import SimpleUser
from .group_0051 import SimpleRepository

class CustomProperty(GitHubModel):
"""Organization Custom Property
class OrganizationSecretScanningAlert(GitHubModel):
"""OrganizationSecretScanningAlert"""
Custom property defined on an organization
"""

number: Missing[int] = Field(
default=UNSET, description="The security alert number."
)
created_at: Missing[datetime] = Field(
default=UNSET,
description="The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
)
updated_at: Missing[Union[None, datetime]] = Field(default=UNSET)
property_name: str = Field(description="The name of the property")
url: Missing[str] = Field(
default=UNSET, description="The REST API URL of the alert resource."
)
html_url: Missing[str] = Field(
default=UNSET, description="The GitHub URL of the alert resource."
)
locations_url: Missing[str] = Field(
default=UNSET,
description="The REST API URL of the code locations for this alert.",
description="The URL that can be used to fetch, update, or delete info about this property via the API.",
)
state: Missing[Literal["open", "resolved"]] = Field(
default=UNSET,
description="Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.",
source_type: Missing[Literal["organization", "enterprise"]] = Field(
default=UNSET, description="The source type of the property"
)
resolution: Missing[
Union[None, Literal["false_positive", "wont_fix", "revoked", "used_in_tests"]]
] = Field(
default=UNSET,
description="**Required when the `state` is `resolved`.** The reason for resolving the alert.",
)
resolved_at: Missing[Union[datetime, None]] = Field(
default=UNSET,
description="The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
value_type: Literal["string", "single_select", "multi_select", "true_false"] = (
Field(description="The type of the value for the property")
)
resolved_by: Missing[Union[None, SimpleUser]] = Field(default=UNSET)
secret_type: Missing[str] = Field(
default=UNSET, description="The type of secret that secret scanning detected."
required: Missing[bool] = Field(
default=UNSET, description="Whether the property is required."
)
secret_type_display_name: Missing[str] = Field(
default=UNSET,
description='User-friendly name for the detected secret, matching the `secret_type`.\nFor a list of built-in patterns, see "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)."',
)
secret: Missing[str] = Field(
default=UNSET, description="The secret that was detected."
default_value: Missing[Union[str, list[str], None]] = Field(
default=UNSET, description="Default value of the property"
)
repository: Missing[SimpleRepository] = Field(
default=UNSET, title="Simple Repository", description="A GitHub repository."
description: Missing[Union[str, None]] = Field(
default=UNSET, description="Short description of the property"
)
push_protection_bypassed: Missing[Union[bool, None]] = Field(
default=UNSET,
description="Whether push protection was bypassed for the detected secret.",
)
push_protection_bypassed_by: Missing[Union[None, SimpleUser]] = Field(default=UNSET)
push_protection_bypassed_at: Missing[Union[datetime, None]] = Field(
default=UNSET,
description="The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
)
push_protection_bypass_request_reviewer: Missing[Union[None, SimpleUser]] = Field(
default=UNSET
)
push_protection_bypass_request_comment: Missing[Union[str, None]] = Field(
default=UNSET,
description="An optional comment when requesting a push protection bypass.",
)
push_protection_bypass_request_html_url: Missing[Union[str, None]] = Field(
default=UNSET, description="The URL to a push protection bypass request."
)
resolution_comment: Missing[Union[str, None]] = Field(
default=UNSET,
description="The comment that was optionally added when this alert was closed",
)
validity: Missing[Literal["active", "inactive", "unknown"]] = Field(
default=UNSET, description="The token status as of the latest validity check."
)
publicly_leaked: Missing[Union[bool, None]] = Field(
default=UNSET, description="Whether the secret was publicly leaked."
)
multi_repo: Missing[Union[bool, None]] = Field(
allowed_values: Missing[
Union[
Annotated[
list[Annotated[str, Field(max_length=75)]],
Field(max_length=200 if PYDANTIC_V2 else None),
],
None,
]
] = Field(
default=UNSET,
description="Whether the detected secret was found in multiple repositories in the same organization or enterprise.",
description="An ordered list of the allowed values of the property.\nThe property can have up to 200 allowed values.",
)
values_editable_by: Missing[
Union[None, Literal["org_actors", "org_and_repo_actors"]]
] = Field(default=UNSET, description="Who can edit the values of the property")


model_rebuild(OrganizationSecretScanningAlert)
model_rebuild(CustomProperty)

__all__ = ("OrganizationSecretScanningAlert",)
__all__ = ("CustomProperty",)
120 changes: 62 additions & 58 deletions githubkit/versions/ghec_v2022_11_28/models/group_0067.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,99 +9,103 @@

from __future__ import annotations

from datetime import datetime
from typing import Literal, Union

from pydantic import Field

from githubkit.compat import GitHubModel, model_rebuild
from githubkit.typing import Missing
from githubkit.utils import UNSET

from .group_0002 import SimpleUser
from .group_0051 import SimpleRepository


class ActionsBillingUsage(GitHubModel):
"""ActionsBillingUsage"""
class OrganizationSecretScanningAlert(GitHubModel):
"""OrganizationSecretScanningAlert"""

total_minutes_used: int = Field(
description="The sum of the free and paid GitHub Actions minutes used."
number: Missing[int] = Field(
default=UNSET, description="The security alert number."
)
total_paid_minutes_used: int = Field(
description="The total paid GitHub Actions minutes used."
created_at: Missing[datetime] = Field(
default=UNSET,
description="The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
)
included_minutes: int = Field(
description="The amount of free GitHub Actions minutes available."
updated_at: Missing[Union[None, datetime]] = Field(default=UNSET)
url: Missing[str] = Field(
default=UNSET, description="The REST API URL of the alert resource."
)
minutes_used_breakdown: ActionsBillingUsagePropMinutesUsedBreakdown = Field()


class ActionsBillingUsagePropMinutesUsedBreakdown(GitHubModel):
"""ActionsBillingUsagePropMinutesUsedBreakdown"""

ubuntu: Missing[int] = Field(
default=UNSET,
alias="UBUNTU",
description="Total minutes used on Ubuntu runner machines.",
html_url: Missing[str] = Field(
default=UNSET, description="The GitHub URL of the alert resource."
)
macos: Missing[int] = Field(
locations_url: Missing[str] = Field(
default=UNSET,
alias="MACOS",
description="Total minutes used on macOS runner machines.",
description="The REST API URL of the code locations for this alert.",
)
windows: Missing[int] = Field(
state: Missing[Literal["open", "resolved"]] = Field(
default=UNSET,
alias="WINDOWS",
description="Total minutes used on Windows runner machines.",
description="Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`.",
)
ubuntu_4_core: Missing[int] = Field(
resolution: Missing[
Union[None, Literal["false_positive", "wont_fix", "revoked", "used_in_tests"]]
] = Field(
default=UNSET,
description="Total minutes used on Ubuntu 4 core runner machines.",
description="**Required when the `state` is `resolved`.** The reason for resolving the alert.",
)
ubuntu_8_core: Missing[int] = Field(
resolved_at: Missing[Union[datetime, None]] = Field(
default=UNSET,
description="Total minutes used on Ubuntu 8 core runner machines.",
description="The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
)
ubuntu_16_core: Missing[int] = Field(
default=UNSET,
description="Total minutes used on Ubuntu 16 core runner machines.",
resolved_by: Missing[Union[None, SimpleUser]] = Field(default=UNSET)
secret_type: Missing[str] = Field(
default=UNSET, description="The type of secret that secret scanning detected."
)
ubuntu_32_core: Missing[int] = Field(
secret_type_display_name: Missing[str] = Field(
default=UNSET,
description="Total minutes used on Ubuntu 32 core runner machines.",
description='User-friendly name for the detected secret, matching the `secret_type`.\nFor a list of built-in patterns, see "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)."',
)
ubuntu_64_core: Missing[int] = Field(
default=UNSET,
description="Total minutes used on Ubuntu 64 core runner machines.",
secret: Missing[str] = Field(
default=UNSET, description="The secret that was detected."
)
windows_4_core: Missing[int] = Field(
default=UNSET,
description="Total minutes used on Windows 4 core runner machines.",
repository: Missing[SimpleRepository] = Field(
default=UNSET, title="Simple Repository", description="A GitHub repository."
)
windows_8_core: Missing[int] = Field(
push_protection_bypassed: Missing[Union[bool, None]] = Field(
default=UNSET,
description="Total minutes used on Windows 8 core runner machines.",
description="Whether push protection was bypassed for the detected secret.",
)
windows_16_core: Missing[int] = Field(
push_protection_bypassed_by: Missing[Union[None, SimpleUser]] = Field(default=UNSET)
push_protection_bypassed_at: Missing[Union[datetime, None]] = Field(
default=UNSET,
description="Total minutes used on Windows 16 core runner machines.",
description="The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
)
windows_32_core: Missing[int] = Field(
default=UNSET,
description="Total minutes used on Windows 32 core runner machines.",
push_protection_bypass_request_reviewer: Missing[Union[None, SimpleUser]] = Field(
default=UNSET
)
windows_64_core: Missing[int] = Field(
push_protection_bypass_request_comment: Missing[Union[str, None]] = Field(
default=UNSET,
description="Total minutes used on Windows 64 core runner machines.",
description="An optional comment when requesting a push protection bypass.",
)
push_protection_bypass_request_html_url: Missing[Union[str, None]] = Field(
default=UNSET, description="The URL to a push protection bypass request."
)
macos_12_core: Missing[int] = Field(
resolution_comment: Missing[Union[str, None]] = Field(
default=UNSET,
description="Total minutes used on macOS 12 core runner machines.",
description="The comment that was optionally added when this alert was closed",
)
total: Missing[int] = Field(
default=UNSET, description="Total minutes used on all runner machines."
validity: Missing[Literal["active", "inactive", "unknown"]] = Field(
default=UNSET, description="The token status as of the latest validity check."
)
publicly_leaked: Missing[Union[bool, None]] = Field(
default=UNSET, description="Whether the secret was publicly leaked."
)
multi_repo: Missing[Union[bool, None]] = Field(
default=UNSET,
description="Whether the detected secret was found in multiple repositories in the same organization or enterprise.",
)


model_rebuild(ActionsBillingUsage)
model_rebuild(ActionsBillingUsagePropMinutesUsedBreakdown)
model_rebuild(OrganizationSecretScanningAlert)

__all__ = (
"ActionsBillingUsage",
"ActionsBillingUsagePropMinutesUsedBreakdown",
)
__all__ = ("OrganizationSecretScanningAlert",)
Loading

0 comments on commit b79cd14

Please sign in to comment.