|
9 | 9 |
|
10 | 10 | from __future__ import annotations |
11 | 11 |
|
12 | | -from typing import Literal, Union |
| 12 | +import datetime as _dt |
| 13 | +from typing import Union |
13 | 14 |
|
14 | 15 | from pydantic import Field |
15 | 16 |
|
16 | 17 | from githubkit.compat import GitHubModel, model_rebuild |
17 | 18 | from githubkit.typing import Missing |
18 | 19 | from githubkit.utils import UNSET |
19 | 20 |
|
20 | | -from .group_0076 import SimpleRepository |
21 | 21 |
|
| 22 | +class OrganizationFull(GitHubModel): |
| 23 | + """Organization Full |
22 | 24 |
|
23 | | -class DependabotRepositoryAccessDetails(GitHubModel): |
24 | | - """Dependabot Repository Access Details |
| 25 | + Prevents users in the organization from using insecure methods of two-factor |
| 26 | + authentication to fulfill a two-factor requirement. |
| 27 | + Removes non-compliant outside collaborators from the organization and its |
| 28 | + repositories. |
25 | 29 |
|
26 | | - Information about repositories that Dependabot is able to access in an |
27 | | - organization |
| 30 | + GitHub currently defines SMS as an insecure method of two-factor authentication. |
| 31 | +
|
| 32 | + If your users are managed by the enterprise this policy will not affect them. |
| 33 | + The first admin account of the enterprise will still be affected. |
28 | 34 | """ |
29 | 35 |
|
30 | | - default_level: Missing[Union[None, Literal["public", "internal"]]] = Field( |
| 36 | + login: str = Field() |
| 37 | + id: int = Field() |
| 38 | + node_id: str = Field() |
| 39 | + url: str = Field() |
| 40 | + repos_url: str = Field() |
| 41 | + events_url: str = Field() |
| 42 | + hooks_url: str = Field() |
| 43 | + issues_url: str = Field() |
| 44 | + members_url: str = Field() |
| 45 | + public_members_url: str = Field() |
| 46 | + avatar_url: str = Field() |
| 47 | + description: Union[str, None] = Field() |
| 48 | + name: Missing[Union[str, None]] = Field(default=UNSET) |
| 49 | + company: Missing[Union[str, None]] = Field(default=UNSET) |
| 50 | + blog: Missing[Union[str, None]] = Field(default=UNSET) |
| 51 | + location: Missing[Union[str, None]] = Field(default=UNSET) |
| 52 | + email: Missing[Union[str, None]] = Field(default=UNSET) |
| 53 | + twitter_username: Missing[Union[str, None]] = Field(default=UNSET) |
| 54 | + is_verified: Missing[bool] = Field(default=UNSET) |
| 55 | + has_organization_projects: bool = Field() |
| 56 | + has_repository_projects: bool = Field() |
| 57 | + public_repos: int = Field() |
| 58 | + public_gists: int = Field() |
| 59 | + followers: int = Field() |
| 60 | + following: int = Field() |
| 61 | + html_url: str = Field() |
| 62 | + type: str = Field() |
| 63 | + total_private_repos: Missing[int] = Field(default=UNSET) |
| 64 | + owned_private_repos: Missing[int] = Field(default=UNSET) |
| 65 | + private_gists: Missing[Union[int, None]] = Field(default=UNSET) |
| 66 | + disk_usage: Missing[Union[int, None]] = Field(default=UNSET) |
| 67 | + collaborators: Missing[Union[int, None]] = Field( |
| 68 | + default=UNSET, |
| 69 | + description="The number of collaborators on private repositories.\n\nThis field may be null if the number of private repositories is over 50,000.", |
| 70 | + ) |
| 71 | + billing_email: Missing[Union[str, None]] = Field(default=UNSET) |
| 72 | + plan: Missing[OrganizationFullPropPlan] = Field(default=UNSET) |
| 73 | + default_repository_permission: Missing[Union[str, None]] = Field(default=UNSET) |
| 74 | + default_repository_branch: Missing[Union[str, None]] = Field( |
31 | 75 | default=UNSET, |
32 | | - description="The default repository access level for Dependabot updates.", |
| 76 | + description="The default branch for repositories created in this organization.", |
33 | 77 | ) |
34 | | - accessible_repositories: Missing[list[Union[None, SimpleRepository]]] = Field( |
| 78 | + members_can_create_repositories: Missing[Union[bool, None]] = Field(default=UNSET) |
| 79 | + two_factor_requirement_enabled: Missing[Union[bool, None]] = Field(default=UNSET) |
| 80 | + members_allowed_repository_creation_type: Missing[str] = Field(default=UNSET) |
| 81 | + members_can_create_public_repositories: Missing[bool] = Field(default=UNSET) |
| 82 | + members_can_create_private_repositories: Missing[bool] = Field(default=UNSET) |
| 83 | + members_can_create_internal_repositories: Missing[bool] = Field(default=UNSET) |
| 84 | + members_can_create_pages: Missing[bool] = Field(default=UNSET) |
| 85 | + members_can_create_public_pages: Missing[bool] = Field(default=UNSET) |
| 86 | + members_can_create_private_pages: Missing[bool] = Field(default=UNSET) |
| 87 | + members_can_delete_repositories: Missing[bool] = Field(default=UNSET) |
| 88 | + members_can_change_repo_visibility: Missing[bool] = Field(default=UNSET) |
| 89 | + members_can_invite_outside_collaborators: Missing[bool] = Field(default=UNSET) |
| 90 | + members_can_delete_issues: Missing[bool] = Field(default=UNSET) |
| 91 | + display_commenter_full_name_setting_enabled: Missing[bool] = Field(default=UNSET) |
| 92 | + readers_can_create_discussions: Missing[bool] = Field(default=UNSET) |
| 93 | + members_can_create_teams: Missing[bool] = Field(default=UNSET) |
| 94 | + members_can_view_dependency_insights: Missing[bool] = Field(default=UNSET) |
| 95 | + members_can_fork_private_repositories: Missing[Union[bool, None]] = Field( |
35 | 96 | default=UNSET |
36 | 97 | ) |
| 98 | + web_commit_signoff_required: Missing[bool] = Field(default=UNSET) |
| 99 | + advanced_security_enabled_for_new_repositories: Missing[bool] = Field( |
| 100 | + default=UNSET, |
| 101 | + description="**Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations) instead.\n\nWhether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization.\n\nThis field is only visible to organization owners or members of a team with the security manager role.", |
| 102 | + ) |
| 103 | + dependabot_alerts_enabled_for_new_repositories: Missing[bool] = Field( |
| 104 | + default=UNSET, |
| 105 | + description="**Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations) instead.\n\nWhether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization.\n\nThis field is only visible to organization owners or members of a team with the security manager role.", |
| 106 | + ) |
| 107 | + dependabot_security_updates_enabled_for_new_repositories: Missing[bool] = Field( |
| 108 | + default=UNSET, |
| 109 | + description="**Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations) instead.\n\nWhether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization.\n\nThis field is only visible to organization owners or members of a team with the security manager role.", |
| 110 | + ) |
| 111 | + dependency_graph_enabled_for_new_repositories: Missing[bool] = Field( |
| 112 | + default=UNSET, |
| 113 | + description="**Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations) instead.\n\nWhether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.\n\nThis field is only visible to organization owners or members of a team with the security manager role.", |
| 114 | + ) |
| 115 | + secret_scanning_enabled_for_new_repositories: Missing[bool] = Field( |
| 116 | + default=UNSET, |
| 117 | + description="**Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations) instead.\n\nWhether secret scanning is automatically enabled for new repositories and repositories transferred to this organization.\n\nThis field is only visible to organization owners or members of a team with the security manager role.", |
| 118 | + ) |
| 119 | + secret_scanning_push_protection_enabled_for_new_repositories: Missing[bool] = Field( |
| 120 | + default=UNSET, |
| 121 | + description="**Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations) instead.\n\nWhether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization.\n\nThis field is only visible to organization owners or members of a team with the security manager role.", |
| 122 | + ) |
| 123 | + secret_scanning_push_protection_custom_link_enabled: Missing[bool] = Field( |
| 124 | + default=UNSET, |
| 125 | + description="Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", |
| 126 | + ) |
| 127 | + secret_scanning_push_protection_custom_link: Missing[Union[str, None]] = Field( |
| 128 | + default=UNSET, |
| 129 | + description="An optional URL string to display to contributors who are blocked from pushing a secret.", |
| 130 | + ) |
| 131 | + secret_scanning_validity_checks_enabled: Missing[bool] = Field( |
| 132 | + default=UNSET, |
| 133 | + description="**Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations) instead.\n\nWhether secret scanning automatic validity checks on supported partner tokens is enabled for all repositories under this organization.", |
| 134 | + ) |
| 135 | + created_at: _dt.datetime = Field() |
| 136 | + updated_at: _dt.datetime = Field() |
| 137 | + archived_at: Union[_dt.datetime, None] = Field() |
| 138 | + deploy_keys_enabled_for_repositories: Missing[bool] = Field( |
| 139 | + default=UNSET, |
| 140 | + description="Controls whether or not deploy keys may be added and used for repositories in the organization.", |
| 141 | + ) |
| 142 | + |
| 143 | + |
| 144 | +class OrganizationFullPropPlan(GitHubModel): |
| 145 | + """OrganizationFullPropPlan""" |
| 146 | + |
| 147 | + name: str = Field() |
| 148 | + space: int = Field() |
| 149 | + private_repos: int = Field() |
| 150 | + filled_seats: Missing[int] = Field(default=UNSET) |
| 151 | + seats: Missing[int] = Field(default=UNSET) |
37 | 152 |
|
38 | 153 |
|
39 | | -model_rebuild(DependabotRepositoryAccessDetails) |
| 154 | +model_rebuild(OrganizationFull) |
| 155 | +model_rebuild(OrganizationFullPropPlan) |
40 | 156 |
|
41 | | -__all__ = ("DependabotRepositoryAccessDetails",) |
| 157 | +__all__ = ( |
| 158 | + "OrganizationFull", |
| 159 | + "OrganizationFullPropPlan", |
| 160 | +) |
0 commit comments