|
18 | 18 | from githubkit.typing import Missing |
19 | 19 | from githubkit.utils import UNSET |
20 | 20 |
|
21 | | -from .group_0008 import Enterprise |
| 21 | +from .group_0069 import BypassResponse |
22 | 22 |
|
23 | 23 |
|
24 | | -class EnterpriseRole(GitHubModel): |
25 | | - """Enterprise Role |
| 24 | +class SecretScanningDismissalRequest(GitHubModel): |
| 25 | + """Secret scanning alert dismissal request |
26 | 26 |
|
27 | | - Enterprise custom roles |
| 27 | + A dismissal request made by a user asking to close a secret scanning alert in |
| 28 | + this repository. |
28 | 29 | """ |
29 | 30 |
|
30 | | - id: int = Field(description="The unique identifier of the role.") |
31 | | - name: str = Field(description="The name of the role.") |
32 | | - description: Missing[Union[str, None]] = Field( |
| 31 | + id: Missing[int] = Field( |
| 32 | + default=UNSET, description="The unique identifier of the dismissal request." |
| 33 | + ) |
| 34 | + number: Missing[int] = Field( |
| 35 | + default=UNSET, |
| 36 | + description="The number uniquely identifying the dismissal request within its repository.", |
| 37 | + ) |
| 38 | + repository: Missing[SecretScanningDismissalRequestPropRepository] = Field( |
| 39 | + default=UNSET, description="The repository the dismissal request is for." |
| 40 | + ) |
| 41 | + organization: Missing[SecretScanningDismissalRequestPropOrganization] = Field( |
| 42 | + default=UNSET, |
| 43 | + description="The organization associated with the repository the dismissal request is for.", |
| 44 | + ) |
| 45 | + requester: Missing[SecretScanningDismissalRequestPropRequester] = Field( |
| 46 | + default=UNSET, description="The user who requested the dismissal." |
| 47 | + ) |
| 48 | + request_type: Missing[str] = Field( |
| 49 | + default=UNSET, description="The type of request." |
| 50 | + ) |
| 51 | + data: Missing[Union[list[SecretScanningDismissalRequestPropDataItems], None]] = ( |
| 52 | + Field( |
| 53 | + default=UNSET, |
| 54 | + description="Data describing the secret alert that is being requested to be dismissed.", |
| 55 | + ) |
| 56 | + ) |
| 57 | + resource_identifier: Missing[str] = Field( |
33 | 58 | default=UNSET, |
34 | | - description="A short description about who this role is for or what permissions it grants.", |
| 59 | + description="The number of the secret scanning alert that was detected.", |
35 | 60 | ) |
36 | | - source: Missing[Union[None, Literal["Enterprise", "Predefined"]]] = Field( |
| 61 | + status: Missing[ |
| 62 | + Literal["pending", "denied", "approved", "cancelled", "expired"] |
| 63 | + ] = Field(default=UNSET, description="The status of the dismissal request.") |
| 64 | + requester_comment: Missing[Union[str, None]] = Field( |
| 65 | + default=UNSET, |
| 66 | + description="The comment the requester provided when creating the dismissal request.", |
| 67 | + ) |
| 68 | + expires_at: Missing[_dt.datetime] = Field( |
| 69 | + default=UNSET, |
| 70 | + description="The date and time the dismissal request will expire.", |
| 71 | + ) |
| 72 | + created_at: Missing[_dt.datetime] = Field( |
| 73 | + default=UNSET, |
| 74 | + description="The date and time the dismissal request was created.", |
| 75 | + ) |
| 76 | + responses: Missing[Union[list[BypassResponse], None]] = Field( |
| 77 | + default=UNSET, description="The responses to the dismissal request." |
| 78 | + ) |
| 79 | + url: Missing[str] = Field(default=UNSET) |
| 80 | + html_url: Missing[str] = Field( |
| 81 | + default=UNSET, description="The URL to view the dismissal request in a browser." |
| 82 | + ) |
| 83 | + |
| 84 | + |
| 85 | +class SecretScanningDismissalRequestPropRepository(GitHubModel): |
| 86 | + """SecretScanningDismissalRequestPropRepository |
| 87 | +
|
| 88 | + The repository the dismissal request is for. |
| 89 | + """ |
| 90 | + |
| 91 | + id: Missing[int] = Field( |
37 | 92 | default=UNSET, |
38 | | - description='Source answers the question, "where did this role come from?"', |
| 93 | + description="The ID of the repository the dismissal request is for.", |
39 | 94 | ) |
40 | | - permissions: list[str] = Field( |
41 | | - description="A list of permissions included in this role." |
| 95 | + name: Missing[str] = Field( |
| 96 | + default=UNSET, |
| 97 | + description="The name of the repository the dismissal request is for.", |
42 | 98 | ) |
43 | | - enterprise: Union[None, Enterprise] = Field() |
44 | | - created_at: _dt.datetime = Field( |
45 | | - description="The date and time the role was created." |
| 99 | + full_name: Missing[str] = Field( |
| 100 | + default=UNSET, |
| 101 | + description="The full name of the repository the dismissal request is for.", |
46 | 102 | ) |
47 | | - updated_at: _dt.datetime = Field( |
48 | | - description="The date and time the role was last updated." |
| 103 | + |
| 104 | + |
| 105 | +class SecretScanningDismissalRequestPropOrganization(GitHubModel): |
| 106 | + """SecretScanningDismissalRequestPropOrganization |
| 107 | +
|
| 108 | + The organization associated with the repository the dismissal request is for. |
| 109 | + """ |
| 110 | + |
| 111 | + id: Missing[int] = Field(default=UNSET, description="The ID of the organization.") |
| 112 | + name: Missing[str] = Field( |
| 113 | + default=UNSET, description="The name of the organization." |
49 | 114 | ) |
50 | 115 |
|
51 | 116 |
|
52 | | -class EnterprisesEnterpriseEnterpriseRolesGetResponse200(GitHubModel): |
53 | | - """EnterprisesEnterpriseEnterpriseRolesGetResponse200""" |
| 117 | +class SecretScanningDismissalRequestPropRequester(GitHubModel): |
| 118 | + """SecretScanningDismissalRequestPropRequester |
54 | 119 |
|
55 | | - total_count: Missing[int] = Field( |
| 120 | + The user who requested the dismissal. |
| 121 | + """ |
| 122 | + |
| 123 | + actor_id: Missing[int] = Field( |
56 | 124 | default=UNSET, |
57 | | - description="The total number of enterprise roles available to the enterprise.", |
| 125 | + description="The ID of the GitHub user who requested the dismissal.", |
58 | 126 | ) |
59 | | - roles: Missing[list[EnterpriseRole]] = Field( |
| 127 | + actor_name: Missing[str] = Field( |
60 | 128 | default=UNSET, |
61 | | - description="The list of enterprise roles available to the enterprise.", |
| 129 | + description="The name of the GitHub user who requested the dismissal.", |
| 130 | + ) |
| 131 | + |
| 132 | + |
| 133 | +class SecretScanningDismissalRequestPropDataItems(GitHubModel): |
| 134 | + """SecretScanningDismissalRequestPropDataItems""" |
| 135 | + |
| 136 | + secret_type: Missing[str] = Field( |
| 137 | + default=UNSET, description="The type of secret that secret scanning detected." |
| 138 | + ) |
| 139 | + alert_number: Missing[str] = Field( |
| 140 | + default=UNSET, |
| 141 | + description="The number of the secret scanning alert that was detected.", |
| 142 | + ) |
| 143 | + reason: Missing[Literal["fixed_later", "false_positive", "tests", "revoked"]] = ( |
| 144 | + Field( |
| 145 | + default=UNSET, |
| 146 | + description="The reason the user provided for requesting the dismissal.", |
| 147 | + ) |
62 | 148 | ) |
63 | 149 |
|
64 | 150 |
|
65 | | -model_rebuild(EnterpriseRole) |
66 | | -model_rebuild(EnterprisesEnterpriseEnterpriseRolesGetResponse200) |
| 151 | +model_rebuild(SecretScanningDismissalRequest) |
| 152 | +model_rebuild(SecretScanningDismissalRequestPropRepository) |
| 153 | +model_rebuild(SecretScanningDismissalRequestPropOrganization) |
| 154 | +model_rebuild(SecretScanningDismissalRequestPropRequester) |
| 155 | +model_rebuild(SecretScanningDismissalRequestPropDataItems) |
67 | 156 |
|
68 | 157 | __all__ = ( |
69 | | - "EnterpriseRole", |
70 | | - "EnterprisesEnterpriseEnterpriseRolesGetResponse200", |
| 158 | + "SecretScanningDismissalRequest", |
| 159 | + "SecretScanningDismissalRequestPropDataItems", |
| 160 | + "SecretScanningDismissalRequestPropOrganization", |
| 161 | + "SecretScanningDismissalRequestPropRepository", |
| 162 | + "SecretScanningDismissalRequestPropRequester", |
71 | 163 | ) |
0 commit comments