|
18 | 18 | from githubkit.typing import Missing |
19 | 19 | from githubkit.utils import UNSET |
20 | 20 |
|
21 | | -from .group_0003 import SimpleUser |
22 | | -from .group_0168 import MinimalRepository |
| 21 | +from .group_0053 import BypassResponse |
23 | 22 |
|
24 | 23 |
|
25 | | -class Package(GitHubModel): |
26 | | - """Package |
| 24 | +class SecretScanningDismissalRequest(GitHubModel): |
| 25 | + """Secret scanning alert dismissal request |
27 | 26 |
|
28 | | - A software package |
| 27 | + A dismissal request made by a user asking to close a secret scanning alert in |
| 28 | + this repository. |
29 | 29 | """ |
30 | 30 |
|
31 | | - id: int = Field(description="Unique identifier of the package.") |
32 | | - name: str = Field(description="The name of the package.") |
33 | | - package_type: Literal[ |
34 | | - "npm", "maven", "rubygems", "docker", "nuget", "container" |
35 | | - ] = Field() |
36 | | - url: str = Field() |
37 | | - html_url: str = Field() |
38 | | - version_count: int = Field(description="The number of versions of the package.") |
39 | | - visibility: Literal["private", "public"] = Field() |
40 | | - owner: Missing[Union[None, SimpleUser]] = Field(default=UNSET) |
41 | | - repository: Missing[Union[None, MinimalRepository]] = Field(default=UNSET) |
42 | | - created_at: datetime = Field() |
43 | | - updated_at: datetime = 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( |
| 58 | + default=UNSET, |
| 59 | + description="The number of the secret scanning alert that was detected.", |
| 60 | + ) |
| 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[datetime] = Field( |
| 69 | + default=UNSET, |
| 70 | + description="The date and time the dismissal request will expire.", |
| 71 | + ) |
| 72 | + created_at: Missing[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 | + ) |
44 | 83 |
|
45 | 84 |
|
46 | | -model_rebuild(Package) |
| 85 | +class SecretScanningDismissalRequestPropRepository(GitHubModel): |
| 86 | + """SecretScanningDismissalRequestPropRepository |
47 | 87 |
|
48 | | -__all__ = ("Package",) |
| 88 | + The repository the dismissal request is for. |
| 89 | + """ |
| 90 | + |
| 91 | + id: Missing[int] = Field( |
| 92 | + default=UNSET, |
| 93 | + description="The ID of the repository the dismissal request is for.", |
| 94 | + ) |
| 95 | + name: Missing[str] = Field( |
| 96 | + default=UNSET, |
| 97 | + description="The name of the repository the dismissal request is for.", |
| 98 | + ) |
| 99 | + full_name: Missing[str] = Field( |
| 100 | + default=UNSET, |
| 101 | + description="The full name of the repository the dismissal request is for.", |
| 102 | + ) |
| 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." |
| 114 | + ) |
| 115 | + |
| 116 | + |
| 117 | +class SecretScanningDismissalRequestPropRequester(GitHubModel): |
| 118 | + """SecretScanningDismissalRequestPropRequester |
| 119 | +
|
| 120 | + The user who requested the dismissal. |
| 121 | + """ |
| 122 | + |
| 123 | + actor_id: Missing[int] = Field( |
| 124 | + default=UNSET, |
| 125 | + description="The ID of the GitHub user who requested the dismissal.", |
| 126 | + ) |
| 127 | + actor_name: Missing[str] = Field( |
| 128 | + default=UNSET, |
| 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 | + |
| 144 | + |
| 145 | +model_rebuild(SecretScanningDismissalRequest) |
| 146 | +model_rebuild(SecretScanningDismissalRequestPropRepository) |
| 147 | +model_rebuild(SecretScanningDismissalRequestPropOrganization) |
| 148 | +model_rebuild(SecretScanningDismissalRequestPropRequester) |
| 149 | +model_rebuild(SecretScanningDismissalRequestPropDataItems) |
| 150 | + |
| 151 | +__all__ = ( |
| 152 | + "SecretScanningDismissalRequest", |
| 153 | + "SecretScanningDismissalRequestPropDataItems", |
| 154 | + "SecretScanningDismissalRequestPropOrganization", |
| 155 | + "SecretScanningDismissalRequestPropRepository", |
| 156 | + "SecretScanningDismissalRequestPropRequester", |
| 157 | +) |
0 commit comments