Skip to content

Commit

Permalink
chore(models): Rebuild models to upstream spec
Browse files Browse the repository at this point in the history
  • Loading branch information
fussybeaver committed Nov 19, 2024
1 parent bb63463 commit 233f215
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/endpoints/apps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1813,8 +1813,6 @@ impl<'api, C: Client> Apps<'api, C> where AdapterError: From<<C as Client>::Err>
///
/// Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.
///
/// When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported.
///
/// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
///
/// [GitHub API docs for create_installation_access_token](https://docs.github.com/rest/apps/apps#create-an-installation-access-token-for-an-app)
Expand Down Expand Up @@ -1863,8 +1861,6 @@ impl<'api, C: Client> Apps<'api, C> where AdapterError: From<<C as Client>::Err>
///
/// Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.
///
/// When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported.
///
/// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
///
/// [GitHub API docs for create_installation_access_token](https://docs.github.com/rest/apps/apps#create-an-installation-access-token-for-an-app)
Expand Down
16 changes: 14 additions & 2 deletions src/endpoints/repos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17739,7 +17739,13 @@ impl<'api, C: Client> Repos<'api, C> where AdapterError: From<<C as Client>::Err
///
/// # Get a release asset
///
/// To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response.
/// To download the asset's binary content:
///
/// - If within a browser, fetch the location specified in the `browser_download_url` key provided in the response.
/// - Alternatively, set the `Accept` header of the request to
/// [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).
/// The API will either redirect the client to the location, or stream it directly if possible.
/// API clients should handle both a `200` or `302` response.
///
/// [GitHub API docs for get_release_asset](https://docs.github.com/rest/releases/assets#get-a-release-asset)
///
Expand Down Expand Up @@ -17779,7 +17785,13 @@ impl<'api, C: Client> Repos<'api, C> where AdapterError: From<<C as Client>::Err
///
/// # Get a release asset
///
/// To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response.
/// To download the asset's binary content:
///
/// - If within a browser, fetch the location specified in the `browser_download_url` key provided in the response.
/// - Alternatively, set the `Accept` header of the request to
/// [`application/octet-stream`](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).
/// The API will either redirect the client to the location, or stream it directly if possible.
/// API clients should handle both a `200` or `302` response.
///
/// [GitHub API docs for get_release_asset](https://docs.github.com/rest/releases/assets#get-a-release-asset)
///
Expand Down
42 changes: 42 additions & 0 deletions src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9280,6 +9280,9 @@ pub struct CustomProperty {
/// The URL that can be used to fetch, update, or delete info about this property via the API.
#[serde(skip_serializing_if="Option::is_none")]
pub url: Option<String>,
/// The source type of the property
#[serde(skip_serializing_if="Option::is_none")]
pub source_type: Option<String>,
/// The type of the value for the property
#[serde(skip_serializing_if="Option::is_none")]
pub value_type: Option<String>,
Expand Down Expand Up @@ -18251,6 +18254,12 @@ pub struct OrganizationRole {
/// A short description about who this role is for or what permissions it grants.
#[serde(skip_serializing_if="Option::is_none")]
pub description: Option<String>,
/// The system role from which this role inherits permissions.
#[serde(skip_serializing_if="Option::is_none")]
pub base_role: Option<String>,
/// Source answers the question, \"where did this role come from?\"
#[serde(skip_serializing_if="Option::is_none")]
pub source: Option<String>,
/// A list of permissions included in this role.
#[serde(skip_serializing_if="Option::is_none")]
pub permissions: Option<Vec<String>>,
Expand Down Expand Up @@ -18307,6 +18316,14 @@ pub struct OrganizationSecretScanningAlert {
/// The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
#[serde(skip_serializing_if="Option::is_none")]
pub push_protection_bypassed_at: Option<chrono::DateTime<chrono::Utc>>,
#[serde(skip_serializing_if="Option::is_none")]
pub push_protection_bypass_request_reviewer: Option<NullableSimpleUser>,
/// An optional comment when requesting a push protection bypass.
#[serde(skip_serializing_if="Option::is_none")]
pub push_protection_bypass_request_comment: Option<String>,
/// The URL to a push protection bypass request.
#[serde(skip_serializing_if="Option::is_none")]
pub push_protection_bypass_request_html_url: Option<String>,
/// The comment that was optionally added when this alert was closed
#[serde(skip_serializing_if="Option::is_none")]
pub resolution_comment: Option<String>,
Expand Down Expand Up @@ -27785,6 +27802,14 @@ pub struct SecretScanningAlert {
/// The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
#[serde(skip_serializing_if="Option::is_none")]
pub push_protection_bypassed_at: Option<chrono::DateTime<chrono::Utc>>,
#[serde(skip_serializing_if="Option::is_none")]
pub push_protection_bypass_request_reviewer: Option<NullableSimpleUser>,
/// An optional comment when requesting a push protection bypass.
#[serde(skip_serializing_if="Option::is_none")]
pub push_protection_bypass_request_comment: Option<String>,
/// The URL to a push protection bypass request.
#[serde(skip_serializing_if="Option::is_none")]
pub push_protection_bypass_request_html_url: Option<String>,
/// The token status as of the latest validity check.
#[serde(skip_serializing_if="Option::is_none")]
pub validity: Option<String>,
Expand Down Expand Up @@ -27969,6 +27994,14 @@ pub struct SecretScanningAlertWebhook {
/// The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
#[serde(skip_serializing_if="Option::is_none")]
pub push_protection_bypassed_at: Option<chrono::DateTime<chrono::Utc>>,
#[serde(skip_serializing_if="Option::is_none")]
pub push_protection_bypass_request_reviewer: Option<NullableSimpleUser>,
/// An optional comment when requesting a push protection bypass.
#[serde(skip_serializing_if="Option::is_none")]
pub push_protection_bypass_request_comment: Option<String>,
/// The URL to a push protection bypass request.
#[serde(skip_serializing_if="Option::is_none")]
pub push_protection_bypass_request_html_url: Option<String>,
/// Whether the detected secret was publicly leaked.
#[serde(skip_serializing_if="Option::is_none")]
pub publicly_leaked: Option<bool>,
Expand Down Expand Up @@ -30162,6 +30195,9 @@ pub struct TeamRepository {
/// The Relationship a Team has with a role.
#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)]
pub struct TeamRoleAssignment {
/// Determines if the team has a direct, indirect, or mixed relationship to a role
#[serde(skip_serializing_if="Option::is_none")]
pub assignment: Option<String>,
#[serde(skip_serializing_if="Option::is_none")]
pub id: Option<i64>,
#[serde(skip_serializing_if="Option::is_none")]
Expand Down Expand Up @@ -31256,6 +31292,12 @@ pub struct UserMarketplacePurchase {
/// The Relationship a User has with a role.
#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)]
pub struct UserRoleAssignment {
/// Determines if the user has a direct, indirect, or mixed relationship to a role
#[serde(skip_serializing_if="Option::is_none")]
pub assignment: Option<String>,
/// Team the user has gotten the role through
#[serde(skip_serializing_if="Option::is_none")]
pub inherited_from: Option<Vec<TeamSimple>>,
#[serde(skip_serializing_if="Option::is_none")]
pub name: Option<String>,
#[serde(skip_serializing_if="Option::is_none")]
Expand Down

0 comments on commit 233f215

Please sign in to comment.