Skip to content

Commit

Permalink
👽 re-generate schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Apr 20, 2024
1 parent cf79e55 commit ee90b7f
Show file tree
Hide file tree
Showing 3,223 changed files with 248,668 additions and 286,798 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ci:
autoupdate_schedule: monthly
autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks"
repos:
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
stages: [commit]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
hooks:
Expand All @@ -15,12 +21,6 @@ repos:
- id: ruff-format
stages: [commit]

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
stages: [commit]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
Expand Down
1,468 changes: 328 additions & 1,140 deletions githubkit/rest/__init__.py

Large diffs are not rendered by default.

8,522 changes: 3,787 additions & 4,735 deletions githubkit/versions/ghec_v2022_11_28/models/__init__.py

Large diffs are not rendered by default.

26 changes: 15 additions & 11 deletions githubkit/versions/ghec_v2022_11_28/models/group_0002.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class GlobalAdvisory(GitHubModel):
withdrawn_at: Union[datetime, None] = Field(
description="The date and time of when the advisory was withdrawn, in ISO 8601 format."
)
vulnerabilities: Union[List[GlobalAdvisoryPropVulnerabilitiesItems], None] = Field(
vulnerabilities: Union[List[Vulnerability], None] = Field(
description="The products and respective version ranges affected by the advisory."
)
cvss: Union[GlobalAdvisoryPropCvss, None] = Field()
Expand Down Expand Up @@ -118,25 +118,29 @@ class GlobalAdvisoryPropCwesItems(GitHubModel):
name: str = Field(description="The name of the CWE.")


class GlobalAdvisoryPropVulnerabilitiesItems(GitHubModel):
"""GlobalAdvisoryPropVulnerabilitiesItems"""
class Vulnerability(GitHubModel):
"""Vulnerability
package: Union[GlobalAdvisoryPropVulnerabilitiesItemsPropPackage, None] = Field(
A vulnerability describing the product and its affected versions within a GitHub
Security Advisory.
"""

package: Union[VulnerabilityPropPackage, None] = Field(
description="The name of the package affected by the vulnerability."
)
vulnerable_version_range: Union[str, None] = Field(
description="The range of the package versions affected by the vulnerability."
)
first_patched_version: Union[str, None] = Field(
description="The package version that resolve the vulnerability."
description="The package version that resolves the vulnerability."
)
vulnerable_functions: Union[List[str], None] = Field(
description="The functions in the package that are affected by the vulnerability."
)


class GlobalAdvisoryPropVulnerabilitiesItemsPropPackage(GitHubModel):
"""GlobalAdvisoryPropVulnerabilitiesItemsPropPackage
class VulnerabilityPropPackage(GitHubModel):
"""VulnerabilityPropPackage
The name of the package affected by the vulnerability.
"""
Expand Down Expand Up @@ -166,15 +170,15 @@ class GlobalAdvisoryPropVulnerabilitiesItemsPropPackage(GitHubModel):
model_rebuild(GlobalAdvisoryPropIdentifiersItems)
model_rebuild(GlobalAdvisoryPropCvss)
model_rebuild(GlobalAdvisoryPropCwesItems)
model_rebuild(GlobalAdvisoryPropVulnerabilitiesItems)
model_rebuild(GlobalAdvisoryPropVulnerabilitiesItemsPropPackage)
model_rebuild(Vulnerability)
model_rebuild(VulnerabilityPropPackage)

__all__ = (
"GlobalAdvisoryPropCreditsItems",
"GlobalAdvisory",
"GlobalAdvisoryPropIdentifiersItems",
"GlobalAdvisoryPropCvss",
"GlobalAdvisoryPropCwesItems",
"GlobalAdvisoryPropVulnerabilitiesItems",
"GlobalAdvisoryPropVulnerabilitiesItemsPropPackage",
"Vulnerability",
"VulnerabilityPropPackage",
)
2 changes: 1 addition & 1 deletion githubkit/versions/ghec_v2022_11_28/models/group_0112.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class OrgCustomProperty(GitHubModel):
required: Missing[bool] = Field(
default=UNSET, description="Whether the property is required."
)
default_value: Missing[Union[str, None]] = Field(
default_value: Missing[Union[str, List[str], None]] = Field(
default=UNSET, description="Default value of the property"
)
description: Missing[Union[str, None]] = Field(
Expand Down
2 changes: 1 addition & 1 deletion githubkit/versions/ghec_v2022_11_28/models/group_0117.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class RepositoryRulesetBypassActor(GitHubModel):
description="The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`."
)
actor_type: Literal[
"RepositoryRole", "Team", "Integration", "OrganizationAdmin"
"Integration", "OrganizationAdmin", "RepositoryRole", "Team"
] = Field(description="The type of actor that can bypass a ruleset")
bypass_mode: Literal["always", "pull_request"] = Field(
description="When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests."
Expand Down
20 changes: 11 additions & 9 deletions githubkit/versions/ghec_v2022_11_28/models/group_0152.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,23 @@
from githubkit.compat import GitHubModel, model_rebuild


class RepositoryRuleParamsCodeScanningThreshold(GitHubModel):
"""CodeScanningThreshold
class RepositoryRuleParamsCodeScanningTool(GitHubModel):
"""CodeScanningTool
A tool and its thresholds.
A tool that must provide code scanning results for this rule to pass.
"""

alerts: Literal["none", "errors", "errors_and_warnings", "all"] = Field(
description="Code scanning alert threshold"
alerts_threshold: Literal["none", "errors", "errors_and_warnings", "all"] = Field(
description='The severity level at which code scanning results that raise alerts block a reference update. For more information on alert severity levels, see "[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)."'
)
security_alerts: Literal[
security_alerts_threshold: Literal[
"none", "critical", "high_or_higher", "medium_or_higher", "all"
] = Field(description="Code scanning security alert threshold.")
] = Field(
description='The severity level at which code scanning results that raise security alerts block a reference update. For more information on security severity levels, see "[About code scanning alerts](https://docs.github.com/enterprise-cloud@latest//code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts#about-alert-severity-and-security-severity-levels)."'
)
tool: str = Field(description="The name of a code scanning tool")


model_rebuild(RepositoryRuleParamsCodeScanningThreshold)
model_rebuild(RepositoryRuleParamsCodeScanningTool)

__all__ = ("RepositoryRuleParamsCodeScanningThreshold",)
__all__ = ("RepositoryRuleParamsCodeScanningTool",)
97 changes: 52 additions & 45 deletions githubkit/versions/ghec_v2022_11_28/models/group_0395.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,66 +10,73 @@
from __future__ import annotations

from datetime import datetime
from typing import List, Union, Literal
from typing import List, Literal

from pydantic import Field

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

from .group_0005 import Integration
from .group_0076 import MinimalRepository
from .group_0180 import PullRequestMinimal

class WebhooksRule(GitHubModel):
"""branch protection rule
class SimpleCheckSuite(GitHubModel):
"""SimpleCheckSuite
A suite of checks performed on the code of a given code change
The branch protection rule. Includes a `name` and all the [branch protection
settings](https://docs.github.com/enterprise-cloud@latest//github/administering-
a-repository/defining-the-mergeability-of-pull-requests/about-protected-
branches#about-branch-protection-settings) applied to branches that match the
name. Binary settings are boolean. Multi-level configurations are one of `off`,
`non_admins`, or `everyone`. Actor and build lists are arrays of strings.
"""

after: Missing[Union[str, None]] = Field(default=UNSET)
app: Missing[Integration] = Field(
admin_enforced: bool = Field()
allow_deletions_enforcement_level: Literal["off", "non_admins", "everyone"] = (
Field()
)
allow_force_pushes_enforcement_level: Literal["off", "non_admins", "everyone"] = (
Field()
)
authorized_actor_names: List[str] = Field()
authorized_actors_only: bool = Field()
authorized_dismissal_actors_only: bool = Field()
create_protected: Missing[bool] = Field(default=UNSET)
created_at: datetime = Field()
dismiss_stale_reviews_on_push: bool = Field()
id: int = Field()
ignore_approvals_from_contributors: bool = Field()
linear_history_requirement_enforcement_level: Literal[
"off", "non_admins", "everyone"
] = Field()
merge_queue_enforcement_level: Literal["off", "non_admins", "everyone"] = Field()
name: str = Field()
pull_request_reviews_enforcement_level: Literal["off", "non_admins", "everyone"] = (
Field()
)
repository_id: int = Field()
require_code_owner_review: bool = Field()
require_last_push_approval: Missing[bool] = Field(
default=UNSET,
title="GitHub app",
description="GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.",
description="Whether the most recent push must be approved by someone other than the person who pushed it",
)
before: Missing[Union[str, None]] = Field(default=UNSET)
conclusion: Missing[
Union[
None,
Literal[
"success",
"failure",
"neutral",
"cancelled",
"skipped",
"timed_out",
"action_required",
"stale",
"startup_failure",
],
]
] = Field(default=UNSET)
created_at: Missing[datetime] = Field(default=UNSET)
head_branch: Missing[Union[str, None]] = Field(default=UNSET)
head_sha: Missing[str] = Field(
default=UNSET, description="The SHA of the head commit that is being checked."
required_approving_review_count: int = Field()
required_conversation_resolution_level: Literal["off", "non_admins", "everyone"] = (
Field()
)
id: Missing[int] = Field(default=UNSET)
node_id: Missing[str] = Field(default=UNSET)
pull_requests: Missing[List[PullRequestMinimal]] = Field(default=UNSET)
repository: Missing[MinimalRepository] = Field(
default=UNSET, title="Minimal Repository", description="Minimal Repository"
required_deployments_enforcement_level: Literal["off", "non_admins", "everyone"] = (
Field()
)
status: Missing[
Literal["queued", "in_progress", "completed", "pending", "waiting"]
] = Field(default=UNSET)
updated_at: Missing[datetime] = Field(default=UNSET)
url: Missing[str] = Field(default=UNSET)
required_status_checks: List[str] = Field()
required_status_checks_enforcement_level: Literal[
"off", "non_admins", "everyone"
] = Field()
signature_requirement_enforcement_level: Literal[
"off", "non_admins", "everyone"
] = Field()
strict_required_status_checks_policy: bool = Field()
updated_at: datetime = Field()


model_rebuild(SimpleCheckSuite)
model_rebuild(WebhooksRule)

__all__ = ("SimpleCheckSuite",)
__all__ = ("WebhooksRule",)
100 changes: 42 additions & 58 deletions githubkit/versions/ghec_v2022_11_28/models/group_0396.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,73 +19,57 @@
from githubkit.compat import GitHubModel, model_rebuild

from .group_0005 import Integration
from .group_0207 import DeploymentSimple
from .group_0395 import SimpleCheckSuite
from .group_0076 import MinimalRepository
from .group_0180 import PullRequestMinimal


class CheckRunWithSimpleCheckSuite(GitHubModel):
"""CheckRun
class SimpleCheckSuite(GitHubModel):
"""SimpleCheckSuite
A check performed on the code of a given code change
A suite of checks performed on the code of a given code change
"""

app: Union[None, Integration] = Field()
check_suite: SimpleCheckSuite = Field(
description="A suite of checks performed on the code of a given code change"
)
completed_at: Union[datetime, None] = Field()
conclusion: Union[
None,
Literal[
"waiting",
"pending",
"startup_failure",
"stale",
"success",
"failure",
"neutral",
"cancelled",
"skipped",
"timed_out",
"action_required",
],
] = Field()
deployment: Missing[DeploymentSimple] = Field(
after: Missing[Union[str, None]] = Field(default=UNSET)
app: Missing[Integration] = Field(
default=UNSET,
title="Deployment",
description="A deployment created as the result of an Actions check run from a workflow that references an environment",
title="GitHub app",
description="GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.",
)
details_url: str = Field()
external_id: str = Field()
head_sha: str = Field(description="The SHA of the commit that is being checked.")
html_url: str = Field()
id: int = Field(description="The id of the check.")
name: str = Field(description="The name of the check.")
node_id: str = Field()
output: CheckRunWithSimpleCheckSuitePropOutput = Field()
pull_requests: List[PullRequestMinimal] = Field()
started_at: datetime = Field()
status: Literal["queued", "in_progress", "completed", "pending"] = Field(
description="The phase of the lifecycle that the check is currently in."
before: Missing[Union[str, None]] = Field(default=UNSET)
conclusion: Missing[
Union[
None,
Literal[
"success",
"failure",
"neutral",
"cancelled",
"skipped",
"timed_out",
"action_required",
"stale",
"startup_failure",
],
]
] = Field(default=UNSET)
created_at: Missing[datetime] = Field(default=UNSET)
head_branch: Missing[Union[str, None]] = Field(default=UNSET)
head_sha: Missing[str] = Field(
default=UNSET, description="The SHA of the head commit that is being checked."
)
url: str = Field()


class CheckRunWithSimpleCheckSuitePropOutput(GitHubModel):
"""CheckRunWithSimpleCheckSuitePropOutput"""

annotations_count: int = Field()
annotations_url: str = Field()
summary: Union[str, None] = Field()
text: Union[str, None] = Field()
title: Union[str, None] = Field()
id: Missing[int] = Field(default=UNSET)
node_id: Missing[str] = Field(default=UNSET)
pull_requests: Missing[List[PullRequestMinimal]] = Field(default=UNSET)
repository: Missing[MinimalRepository] = Field(
default=UNSET, title="Minimal Repository", description="Minimal Repository"
)
status: Missing[
Literal["queued", "in_progress", "completed", "pending", "waiting"]
] = Field(default=UNSET)
updated_at: Missing[datetime] = Field(default=UNSET)
url: Missing[str] = Field(default=UNSET)


model_rebuild(CheckRunWithSimpleCheckSuite)
model_rebuild(CheckRunWithSimpleCheckSuitePropOutput)
model_rebuild(SimpleCheckSuite)

__all__ = (
"CheckRunWithSimpleCheckSuite",
"CheckRunWithSimpleCheckSuitePropOutput",
)
__all__ = ("SimpleCheckSuite",)
Loading

0 comments on commit ee90b7f

Please sign in to comment.