|
9 | 9 |
|
10 | 10 | from __future__ import annotations |
11 | 11 |
|
12 | | -from datetime import datetime |
13 | | -from typing import Union |
| 12 | +from typing import Literal, Union |
14 | 13 |
|
15 | 14 | from pydantic import Field |
16 | 15 |
|
17 | 16 | from githubkit.compat import GitHubModel, model_rebuild |
18 | 17 | from githubkit.typing import Missing |
19 | 18 | from githubkit.utils import UNSET |
20 | 19 |
|
| 20 | +from .group_0058 import SimpleRepository |
21 | 21 |
|
22 | | -class OrganizationFull(GitHubModel): |
23 | | - """Organization Full |
24 | 22 |
|
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. |
| 23 | +class DependabotRepositoryAccessDetails(GitHubModel): |
| 24 | + """Dependabot Repository Access Details |
29 | 25 |
|
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. |
| 26 | + Information about repositories that Dependabot is able to access in an |
| 27 | + organization |
34 | 28 | """ |
35 | 29 |
|
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 | | - members_can_create_repositories: Missing[Union[bool, None]] = Field(default=UNSET) |
75 | | - two_factor_requirement_enabled: Missing[Union[bool, None]] = Field(default=UNSET) |
76 | | - members_allowed_repository_creation_type: Missing[str] = Field(default=UNSET) |
77 | | - members_can_create_public_repositories: Missing[bool] = Field(default=UNSET) |
78 | | - members_can_create_private_repositories: Missing[bool] = Field(default=UNSET) |
79 | | - members_can_create_internal_repositories: Missing[bool] = Field(default=UNSET) |
80 | | - members_can_create_pages: Missing[bool] = Field(default=UNSET) |
81 | | - members_can_create_public_pages: Missing[bool] = Field(default=UNSET) |
82 | | - members_can_create_private_pages: Missing[bool] = Field(default=UNSET) |
83 | | - members_can_fork_private_repositories: Missing[Union[bool, None]] = Field( |
84 | | - default=UNSET |
85 | | - ) |
86 | | - web_commit_signoff_required: Missing[bool] = Field(default=UNSET) |
87 | | - advanced_security_enabled_for_new_repositories: Missing[bool] = Field( |
| 30 | + default_level: Missing[Union[None, Literal["public", "internal"]]] = Field( |
88 | 31 | default=UNSET, |
89 | | - 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.", |
| 32 | + description="The default repository access level for Dependabot updates.", |
90 | 33 | ) |
91 | | - dependabot_alerts_enabled_for_new_repositories: Missing[bool] = Field( |
92 | | - default=UNSET, |
93 | | - 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.", |
94 | | - ) |
95 | | - dependabot_security_updates_enabled_for_new_repositories: Missing[bool] = Field( |
96 | | - default=UNSET, |
97 | | - 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.", |
98 | | - ) |
99 | | - dependency_graph_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 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.", |
102 | | - ) |
103 | | - secret_scanning_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 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.", |
106 | | - ) |
107 | | - secret_scanning_push_protection_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 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.", |
110 | | - ) |
111 | | - secret_scanning_push_protection_custom_link_enabled: Missing[bool] = Field( |
112 | | - default=UNSET, |
113 | | - description="Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.", |
114 | | - ) |
115 | | - secret_scanning_push_protection_custom_link: Missing[Union[str, None]] = Field( |
116 | | - default=UNSET, |
117 | | - description="An optional URL string to display to contributors who are blocked from pushing a secret.", |
118 | | - ) |
119 | | - secret_scanning_validity_checks_enabled: 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 automatic validity checks on supported partner tokens is enabled for all repositories under this organization.", |
122 | | - ) |
123 | | - created_at: datetime = Field() |
124 | | - updated_at: datetime = Field() |
125 | | - archived_at: Union[datetime, None] = Field() |
126 | | - deploy_keys_enabled_for_repositories: Missing[bool] = Field( |
127 | | - default=UNSET, |
128 | | - description="Controls whether or not deploy keys may be added and used for repositories in the organization.", |
129 | | - ) |
130 | | - |
131 | | - |
132 | | -class OrganizationFullPropPlan(GitHubModel): |
133 | | - """OrganizationFullPropPlan""" |
134 | | - |
135 | | - name: str = Field() |
136 | | - space: int = Field() |
137 | | - private_repos: int = Field() |
138 | | - filled_seats: Missing[int] = Field(default=UNSET) |
139 | | - seats: Missing[int] = Field(default=UNSET) |
| 34 | + accessible_repositories: Missing[list[SimpleRepository]] = Field(default=UNSET) |
140 | 35 |
|
141 | 36 |
|
142 | | -model_rebuild(OrganizationFull) |
143 | | -model_rebuild(OrganizationFullPropPlan) |
| 37 | +model_rebuild(DependabotRepositoryAccessDetails) |
144 | 38 |
|
145 | | -__all__ = ( |
146 | | - "OrganizationFull", |
147 | | - "OrganizationFullPropPlan", |
148 | | -) |
| 39 | +__all__ = ("DependabotRepositoryAccessDetails",) |
0 commit comments